1
0
mirror of https://github.com/coalaura/whiskr.git synced 2025-12-02 20:22:52 +00:00

fix file parser not matching sometimes

This commit is contained in:
Laura
2025-11-04 21:12:27 +01:00
parent 16449d05c6
commit 79e0304e08

View File

@@ -115,7 +115,7 @@
return `§|FILE|${index}`;
});
const html = marked.parse(markdown).replace(/(?:<p>\s*)§\|FILE\|(\d+)\|§(?:<\/p>\s*)/g, (match, index) => {
const html = marked.parse(markdown).replace(/(?:<p>\s*)?§\|FILE\|(\d+)\|§(?:<\/p>\s*)?/g, (match, index) => {
index = parseInt(index, 10);
if (index < files.length) {