STscript syntax highlight: Fix quoted shorthand run regex Fixes #4365

5366175109c417ac5f38ba6b5341bd90a2ce7b88

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +1 -1Ignore whitespace
public/scripts/slash-commands/SlashCommandParser.js+1 -1
@@ -226,7 +226,7 @@ export class SlashCommandParser {
226226
227 function getQuotedRunRegex() {227 function getQuotedRunRegex() {
228 try {228 try {
229 return new RegExp('(".+?(?<!\\\\)")|(\\S+?)(\\||$|\\s)');229 return new RegExp('(".+?(?<!\\\\)")|((?:[^\\s\\|"]|"[^"]*")*)(\\||$|\\s)');
230 } catch {230 } catch {
231 // fallback for browsers that don't support lookbehind231 // fallback for browsers that don't support lookbehind
232 return /(".+?")|(\S+?)(\||$|\s)/;232 return /(".+?")|(\S+?)(\||$|\s)/;