From a34a5d187b2d98553f68a6732a2003b754a20252 Mon Sep 17 00:00:00 2001 From: Gazook89 Date: Sat, 2 May 2026 15:36:56 -0500 Subject: [PATCH] Fix issue with closing brace not highlighting --- client/components/codeEditor/customHighlight.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/client/components/codeEditor/customHighlight.js b/client/components/codeEditor/customHighlight.js index 8797704cc..86bad59c8 100644 --- a/client/components/codeEditor/customHighlight.js +++ b/client/components/codeEditor/customHighlight.js @@ -182,13 +182,14 @@ export function tokenizeCustomMarkdown(text) { } if(lineText.includes('{') && lineText.includes('}')) { - const injectionRegex = /(?:^|[^{\n])({(?=((?:[:=](?:"[\w,\-()#%. ]*"|[\w\-()#%.]*)|[^"':={}\s]*)*))\2})/gm; + const injectionRegex = /(?:^|[^{\n])({(?=((?:[:=](?:"[\w,\-()#%. ]*"|[\w\-()#%.]*)|[^"':={}\s]*)*))\2})/gmd; let match; while ((match = injectionRegex.exec(lineText)) !== null) { + console.log(match[2]); tokens.push({ line : lineNumber, - from : match.index, - to : match.index + match[1].length, + from : match.indices[1][0], + to : match.indices[1][1], type : customTags.injection, }); }