Skip to content

Commit

Permalink
refactor: format
Browse files Browse the repository at this point in the history
  • Loading branch information
yukun-dong committed Jul 10, 2023
1 parent 69b5fc2 commit ae84c3b
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions bot-sso/helpers/ssoDialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,20 +184,20 @@ export class SSODialog extends ComponentDialog {
return text;
}

private expressionMatchesText(matchPatterns: MatchTerm[],userInput: string): RegExpExecArray | boolean {
let matchResult: RegExpExecArray | boolean;
for (const pattern of matchPatterns) {
if (typeof pattern == "string") {
matchResult = new RegExp(pattern).exec(userInput);
} else if (pattern instanceof RegExp) {
matchResult = pattern.exec(userInput);
} else {
matchResult = pattern(userInput);
}
if (matchResult) {
return matchResult;
}
}
return false;
private expressionMatchesText(matchPatterns: MatchTerm[], userInput: string): RegExpExecArray | boolean {
let matchResult: RegExpExecArray | boolean;
for (const pattern of matchPatterns) {
if (typeof pattern == "string") {
matchResult = new RegExp(pattern).exec(userInput);
} else if (pattern instanceof RegExp) {
matchResult = pattern.exec(userInput);
} else {
matchResult = pattern(userInput);
}
if (matchResult) {
return matchResult;
}
}
return false;
}
}

0 comments on commit ae84c3b

Please sign in to comment.