mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 08:10:11 +01:00
Merge pull request #3994 from microsoft/hediet/b/lonely-pelican
Fixes regexp
This commit is contained in:
commit
8bb1a4e863
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue