You've already forked element-web
mirror of
https://github.com/element-hq/element-web.git
synced 2025-12-01 09:58:03 +03:00
Modified regex to account for an immediate new line after slash commands
Signed-off-by: Jaiwanth <jaiwanth2011@gmail.com>
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user