From 8b776491e8a71a847c72fcbe1a0d08768581efd2 Mon Sep 17 00:00:00 2001 From: LenAnderson Date: Sun, 19 May 2024 15:52:30 -0400 Subject: [PATCH] fix endOfText current char must be whitespace as well --- public/scripts/slash-commands/SlashCommandParser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/scripts/slash-commands/SlashCommandParser.js b/public/scripts/slash-commands/SlashCommandParser.js index 171a38491..9b839ca23 100644 --- a/public/scripts/slash-commands/SlashCommandParser.js +++ b/public/scripts/slash-commands/SlashCommandParser.js @@ -109,7 +109,7 @@ export class SlashCommandParser { return this.text[this.index]; } get endOfText() { - return this.index >= this.text.length || /^\s+$/.test(this.ahead); + return this.index >= this.text.length || (/\s/.test(this.char) && /^\s+$/.test(this.ahead)); }