Merge pull request #3992 from microsoft/hediet/b/complex-silverfish

Fixes slow regexp issue
This commit is contained in:
Henning Dieterichs 2023-05-31 17:37:59 +02:00 committed by GitHub
commit c84c0cb8f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -247,7 +247,7 @@ export class PlaygroundModel {
const regexp = new RegExp( const regexp = new RegExp(
"(\\b" + "(\\b" +
escapeRegexpChars(codeStringName) + escapeRegexpChars(codeStringName) +
":[^\\w`]*`)([^`\\\\]|\\n|\\\\\\\\|\\\\`)*`" ":[^\\w`]*`)([^`\\\\\\n]|\\n|\\\\\\\\|\\\\|\\$`)*`"
); );
const js = this.js; const js = this.js;
const str = value const str = value