From 79e0304e08925d7036f60465d443b6ce12784ad8 Mon Sep 17 00:00:00 2001 From: Laura Date: Tue, 4 Nov 2025 21:12:27 +0100 Subject: [PATCH] fix file parser not matching sometimes --- static/js/markdown.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/markdown.js b/static/js/markdown.js index 1d2bbe0..4430943 100644 --- a/static/js/markdown.js +++ b/static/js/markdown.js @@ -115,7 +115,7 @@ return `§|FILE|${index}|§`; }); - const html = marked.parse(markdown).replace(/(?:

\s*)§\|FILE\|(\d+)\|§(?:<\/p>\s*)/g, (match, index) => { + const html = marked.parse(markdown).replace(/(?:

\s*)?§\|FILE\|(\d+)\|§(?:<\/p>\s*)?/g, (match, index) => { index = parseInt(index, 10); if (index < files.length) {