diff --git a/website/src/website/pages/playground/PlaygroundModel.ts b/website/src/website/pages/playground/PlaygroundModel.ts index 85cb1313..a4c8f403 100644 --- a/website/src/website/pages/playground/PlaygroundModel.ts +++ b/website/src/website/pages/playground/PlaygroundModel.ts @@ -251,7 +251,10 @@ export class PlaygroundModel { ); debugger; const js = this.js; - const str = value.replaceAll("\\", "\\\\").replaceAll("`", "\\`"); + const str = value + .replaceAll("\\", "\\\\") + .replaceAll("$", "\\$") + .replaceAll("`", "\\`"); const newJs = js.replace(regexp, "$1" + str + "`"); const autoReload = this.settings.autoReload; this.settings.autoReload = false;