mirror of
https://github.com/vector-im/element-web.git
synced 2025-11-30 15:01: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 } {
|
||||
// trim any trailing whitespace, as it can confuse the parser for IRC-style commands
|
||||
input = input.trimEnd();
|
||||
if (input.startsWith("/")) return {}; // not a command
|
||||
if (!input.startsWith("/")) return {}; // not a command
|
||||
|
||||
const bits = input.match(/^(\S+?)(?:[ \n]+((.|\n)*))?$/);
|
||||
let cmd: string;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user