Ver código fonte

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

Fixes slow regexp issue
Henning Dieterichs 2 anos atrás
pai
commit
c84c0cb8f9

+ 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