浏览代码

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

Fixes slow regexp issue
Henning Dieterichs 2 年之前
父节点
当前提交
c84c0cb8f9
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      website/src/website/pages/playground/PlaygroundModel.ts

+ 1 - 1
website/src/website/pages/playground/PlaygroundModel.ts

@@ -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