소스 검색

Merge pull request #3994 from microsoft/hediet/b/lonely-pelican

Fixes regexp
Henning Dieterichs 2 년 전
부모
커밋
8bb1a4e863
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      website/src/website/pages/playground/PlaygroundModel.ts

+ 2 - 2
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;