Make SonarCloud happier about our code quality (#10630)

This commit is contained in:
Michael Telatynski
2023-04-17 12:57:19 +00:00
committed by GitHub
parent 9c277d6b02
commit 568ec77208
4 changed files with 7 additions and 6 deletions
+2 -3
View File
@@ -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)*))?$/);