diff --git a/public/scripts/slash-commands/SlashCommandParser.js b/public/scripts/slash-commands/SlashCommandParser.js index 75e8f5f1a..892ac2c26 100644 --- a/public/scripts/slash-commands/SlashCommandParser.js +++ b/public/scripts/slash-commands/SlashCommandParser.js @@ -797,7 +797,12 @@ export class SlashCommandParser { return this.testSymbol(/\/\*/); } testBlockCommentEnd() { - return this.testSymbol(/\*\|/); + if (!this.verifyCommandNames) { + if (this.index >= this.text.length) return true; + } else { + if (this.ahead.length < 1) throw new SlashCommandParserError(`Unclosed block comment at position ${this.userIndex}`, this.text, this.index); + } + return this.testSymbol('*|'); } parseBlockComment() { const start = this.index + 1;