From 5744a230ae4299afc1b3e4c28a53005391e7dce2 Mon Sep 17 00:00:00 2001 From: Henning Dieterichs Date: Fri, 2 Jun 2023 00:52:09 +0200 Subject: [PATCH] Fixes regexp --- website/src/website/pages/playground/PlaygroundModel.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/src/website/pages/playground/PlaygroundModel.ts b/website/src/website/pages/playground/PlaygroundModel.ts index 58668cab..3133d9ba 100644 --- a/website/src/website/pages/playground/PlaygroundModel.ts +++ b/website/src/website/pages/playground/PlaygroundModel.ts @@ -247,12 +247,12 @@ export class PlaygroundModel { const regexp = new RegExp( "(\\b" + escapeRegexpChars(codeStringName) + - ":[^\\w`]*`)([^`\\\\\\n]|\\n|\\\\\\\\|\\\\|\\$`)*`" + ":[^\\w`]*`)([^`\\\\\\n]|\\n|\\\\\\\\|\\\\\\`|\\\\\\$)*`" ); const js = this.js; const str = value .replaceAll("\\", "\\\\") - .replaceAll("$", "\\$") + .replaceAll("$", "\\$$$$") .replaceAll("`", "\\`"); const newJs = js.replace(regexp, "$1" + str + "`"); const autoReload = this.settings.autoReload;