0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-05-07 18:48:39 +00:00

Merge branch 'master' of https://github.com/naturalcrit/homebrewery into fix-CM-bugs

This commit is contained in:
Víctor Losada Hernández
2026-05-04 16:16:02 +02:00
@@ -182,13 +182,13 @@ export function tokenizeCustomMarkdown(text) {
} }
if(lineText.includes('{') && lineText.includes('}')) { if(lineText.includes('{') && lineText.includes('}')) {
const injectionRegex = /(?:^|[^{\n])({(?=((?:[:=](?:"[\w,\-()#%. ]*"|[\w\-()#%.]*)|[^"':={}\s]*)*))\2})/gm; const injectionRegex = /(?:^|[^{\n])({(?=((?:[:=](?:"[\w,\-()#%. ]*"|[\w\-()#%.]*)|[^"':={}\s]*)*))\2})/gmd;
let match; let match;
while ((match = injectionRegex.exec(lineText)) !== null) { while ((match = injectionRegex.exec(lineText)) !== null) {
tokens.push({ tokens.push({
line : lineNumber, line : lineNumber,
from : match.index, from : match.indices[1][0],
to : match.index + match[1].length, to : match.indices[1][1],
type : customTags.injection, type : customTags.injection,
}); });
} }