diff --git a/src/SlashCommands.tsx b/src/SlashCommands.tsx index 3fa6c0d7ee..133a2708dc 100644 --- a/src/SlashCommands.tsx +++ b/src/SlashCommands.tsx @@ -995,6 +995,7 @@ export const Commands = [ args: " ", runFn: function(_, args) { if (args) { + // matches the first whitespace delimited group and then the rest of the string const matches = args.match(/^(\S+?)(?: +(.*))?$/s); if (matches) { const [userId, msg] = matches.slice(1);