mirror of
https://github.com/vector-im/element-web.git
synced 2025-12-01 15:31:43 +01:00
Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
44b23d2191
commit
0105f566c9
@ -994,7 +994,7 @@ Commands.forEach((cmd) => {
|
|||||||
export function parseCommandString(input: string): { cmd?: string; args?: string } {
|
export function parseCommandString(input: string): { cmd?: string; args?: string } {
|
||||||
// trim any trailing whitespace, as it can confuse the parser for IRC-style commands
|
// trim any trailing whitespace, as it can confuse the parser for IRC-style commands
|
||||||
input = input.trimEnd();
|
input = input.trimEnd();
|
||||||
if (input.startsWith("/")) return {}; // not a command
|
if (!input.startsWith("/")) return {}; // not a command
|
||||||
|
|
||||||
const bits = input.match(/^(\S+?)(?:[ \n]+((.|\n)*))?$/);
|
const bits = input.match(/^(\S+?)(?:[ \n]+((.|\n)*))?$/);
|
||||||
let cmd: string;
|
let cmd: string;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user