From 9ed32527a6f1f512cf6c284416bbe4781ed13f36 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 17 Dec 2023 15:47:17 +1300 Subject: [PATCH] Account for prefixed spaces when generating text --- shared/naturalcrit/markdown.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/naturalcrit/markdown.js b/shared/naturalcrit/markdown.js index b0844debc..5be80ac97 100644 --- a/shared/naturalcrit/markdown.js +++ b/shared/naturalcrit/markdown.js @@ -96,7 +96,7 @@ const mustacheDivs = { while (delim = blockRegex.exec(match[0])?.[0].trim()) { if(!tags) { tags = `${processStyleTags(delim.substring(2))}`; - endTags = delim.length; + endTags = delim.length + src.indexOf(delim); } if(delim.startsWith('{{')) { blockCount++;