STscript syntax highlight: Fix quoted shorthand run regex Fixes #4365
| @@ -226,7 +226,7 @@ export class SlashCommandParser { | |||
| 226 | 226 | ||
| 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 lookbehind | 231 | // fallback for browsers that don't support lookbehind |
| 232 | return /(".+?")|(\S+?)(\||$|\s)/; | 232 | return /(".+?")|(\S+?)(\||$|\s)/; |