From f1b602d4390f19e05a36703302ffcc651628d46c Mon Sep 17 00:00:00 2001 From: LenAnderson Date: Thu, 18 Apr 2024 16:06:07 -0400 Subject: [PATCH] fix for escaping first character of value --- public/scripts/slash-commands/SlashCommandParser.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/scripts/slash-commands/SlashCommandParser.js b/public/scripts/slash-commands/SlashCommandParser.js index 3d37eaf3e..29ee0151e 100644 --- a/public/scripts/slash-commands/SlashCommandParser.js +++ b/public/scripts/slash-commands/SlashCommandParser.js @@ -460,7 +460,7 @@ export class SlashCommandParser { } parseUnnamedArgument() { /**@type {SlashCommandClosure|String}*/ - let value = ''; + let value = this.take(); // take the first, already tested, char let isList = false; let listValues = []; while (!this.testUnnamedArgumentEnd()) { @@ -512,7 +512,7 @@ export class SlashCommandParser { return this.testSymbol(']'); } parseListValue() { - let value = ''; + let value = this.take(); // take the already tested opening bracket while (!this.testListValueEnd()) value += this.take(); // take all chars until closing bracket value += this.take(); // take closing bracket return value; @@ -526,7 +526,7 @@ export class SlashCommandParser { return this.testCommandEnd(); } parseValue() { - let value = ''; + let value = this.take(); // take the first, already tested, char while (!this.testValueEnd()) value += this.take(); // take all chars until value end return value; }