From 3fa13d7de3eb2b22fd665a87a10f78e91f40c73e Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 12 May 2020 10:23:53 +0100 Subject: [PATCH] Add comment for the regex Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/SlashCommands.tsx | 1 + 1 file changed, 1 insertion(+) 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);