mirror of https://github.com/vector-im/riot-web
Modified regex to account for an immediate new line after slash commands
Signed-off-by: Jaiwanth <jaiwanth2011@gmail.com>pull/21833/head
parent
a87e637666
commit
d73648dfb0
|
@ -1182,7 +1182,7 @@ export function parseCommandString(input: string) {
|
||||||
input = input.replace(/\s+$/, '');
|
input = input.replace(/\s+$/, '');
|
||||||
if (input[0] !== '/') return {}; // not a command
|
if (input[0] !== '/') return {}; // not a command
|
||||||
|
|
||||||
const bits = input.match(/^(\S+?)(?: +((.|\n)*))?$/);
|
const bits = input.match(/^(\S+?)(?:[ \n]+((.|\n)*))?$/);
|
||||||
let cmd;
|
let cmd;
|
||||||
let args;
|
let args;
|
||||||
if (bits) {
|
if (bits) {
|
||||||
|
|
Loading…
Reference in New Issue