From d73648dfb03594e0a1a8e9772b9b15fd8cdcbe20 Mon Sep 17 00:00:00 2001 From: Jaiwanth Date: Mon, 15 Feb 2021 17:46:32 +0530 Subject: [PATCH] Modified regex to account for an immediate new line after slash commands Signed-off-by: Jaiwanth --- src/SlashCommands.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SlashCommands.tsx b/src/SlashCommands.tsx index a39ad33b04..38e5a95f7f 100644 --- a/src/SlashCommands.tsx +++ b/src/SlashCommands.tsx @@ -1182,7 +1182,7 @@ export function parseCommandString(input: string) { input = input.replace(/\s+$/, ''); if (input[0] !== '/') return {}; // not a command - const bits = input.match(/^(\S+?)(?: +((.|\n)*))?$/); + const bits = input.match(/^(\S+?)(?:[ \n]+((.|\n)*))?$/); let cmd; let args; if (bits) {