From 292c2400a0fbc5db7d6cf099da027cf26d5731b7 Mon Sep 17 00:00:00 2001 From: Henning Dieterichs Date: Wed, 31 May 2023 17:19:52 +0200 Subject: [PATCH] Fixes slow regexp issue --- website/src/website/pages/playground/PlaygroundModel.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/website/pages/playground/PlaygroundModel.ts b/website/src/website/pages/playground/PlaygroundModel.ts index 51dd801c5a..58668cab58 100644 --- a/website/src/website/pages/playground/PlaygroundModel.ts +++ b/website/src/website/pages/playground/PlaygroundModel.ts @@ -247,7 +247,7 @@ export class PlaygroundModel { const regexp = new RegExp( "(\\b" + escapeRegexpChars(codeStringName) + - ":[^\\w`]*`)([^`\\\\]|\\n|\\\\\\\\|\\\\`)*`" + ":[^\\w`]*`)([^`\\\\\\n]|\\n|\\\\\\\\|\\\\|\\$`)*`" ); const js = this.js; const str = value