From 18f7b295362952438b138b2c17c80d306f0077ec Mon Sep 17 00:00:00 2001 From: LenAnderson Date: Fri, 12 Apr 2024 17:29:42 -0400 Subject: [PATCH] allow open quotes on dry run --- public/scripts/slash-commands/SlashCommandParser.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/scripts/slash-commands/SlashCommandParser.js b/public/scripts/slash-commands/SlashCommandParser.js index b6f6dadae..eb0132a32 100644 --- a/public/scripts/slash-commands/SlashCommandParser.js +++ b/public/scripts/slash-commands/SlashCommandParser.js @@ -387,7 +387,11 @@ export class SlashCommandParser { return this.char == '"' && this.behind.slice(-1) != '\\'; } testQuotedValueEnd() { - if (this.endOfText) throw new SlashCommandParserError(`Unexpected end of quoted value at position ${this.index}`, this.text, this.index); + if (this.endOfText) { + if (this.verifyCommandNames) throw new SlashCommandParserError(`Unexpected end of quoted value at position ${this.index}`, this.text, this.index); + else return true; + } + if (!this.verifyCommandNames && this.char == ':' && this.ahead == '}') return true; return this.char == '"' && this.behind.slice(-1) != '\\'; } parseQuotedValue() {