We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e7087e1 commit 3d77fcdCopy full SHA for 3d77fcd
lib/utils/compile-markdown.js
@@ -46,10 +46,13 @@ function compactParagraphs(tokens) {
46
last.text = `${last.text} ${token.text}`;
47
}
48
49
- balance += count(/(?<!`.*){{#/g, token.text);
50
- balance += count(/(?<!`.*)<[A-Z]/g, token.text);
51
- balance -= count(/{{\/.*}}(?!.*`)/g, token.text);
52
- balance -= count(/<\/[A-Z][a-z]+>(?!.*`)/g, token.text);
+ let tokenText = token.text || '';
+ let textWithoutCode = tokenText.replace(/`[\s\S]*?`/g, '');
+
+ balance += count(/{{#/g, textWithoutCode);
53
+ balance += count(/<[A-Z]/g, textWithoutCode);
54
+ balance -= count(/{{\//g, textWithoutCode);
55
+ balance -= count(/<\/[A-Z]/g, textWithoutCode);
56
57
58
return compacted;
0 commit comments