From afb849cfb67b70bdd642b073d4f1031741c34297 Mon Sep 17 00:00:00 2001 From: LenAnderson Date: Thu, 4 Jul 2024 11:48:31 -0400 Subject: [PATCH] fix REPLACE_GETVAR nesting issues --- public/scripts/slash-commands/SlashCommandParser.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/scripts/slash-commands/SlashCommandParser.js b/public/scripts/slash-commands/SlashCommandParser.js index d7f32990c..0f3c6a85c 100644 --- a/public/scripts/slash-commands/SlashCommandParser.js +++ b/public/scripts/slash-commands/SlashCommandParser.js @@ -645,6 +645,7 @@ export class SlashCommandParser { closure.abortController = this.abortController; closure.debugController = this.debugController; this.scope = closure.scope; + const oldClosure = this.closure; this.closure = closure; this.discardWhitespace(); while (this.testNamedArgument()) { @@ -698,6 +699,7 @@ export class SlashCommandParser { } closureIndexEntry.end = this.index - 1; this.scope = closure.scope.parent; + this.closure = oldClosure ?? closure; return closure; }