Skip to content

Commit

Permalink
Merge pull request #3994 from microsoft/hediet/b/lonely-pelican
Browse files Browse the repository at this point in the history
Fixes regexp
  • Loading branch information
hediet authored Jun 2, 2023
2 parents c84c0cb + 5744a23 commit 8bb1a4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions website/src/website/pages/playground/PlaygroundModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8bb1a4e

Please sign in to comment.