Make SonarCloud happier about our code quality (#10630)
This commit is contained in:
@@ -1427,9 +1427,8 @@ 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.replace(/\s+$/, "");
|
||||
// trim any trailing whitespace, as it can confuse the parser for IRC-style commands
|
||||
input = input.trimEnd();
|
||||
if (input[0] !== "/") return {}; // not a command
|
||||
|
||||
const bits = input.match(/^(\S+?)(?:[ \n]+((.|\n)*))?$/);
|
||||
|
||||
Reference in New Issue
Block a user