mirror of
https://github.com/koloml/philomena-tagging-assistant.git
synced 2026-06-23 18:22:20 +00:00
Sonar: Replacing string.match(regexp) with regexp.exec(string)
This commit is contained in:
@@ -189,7 +189,7 @@ export class QueryLexer {
|
||||
*/
|
||||
#matchAt(targetRegExp: RegExp, index: number, resultCarrier: MatchResultCarry = {}): resultCarrier is SuccessfulMatchResultCarry {
|
||||
targetRegExp.lastIndex = index;
|
||||
resultCarrier.match = this.#value.match(targetRegExp);
|
||||
resultCarrier.match = targetRegExp.exec(this.#value);
|
||||
|
||||
return resultCarrier.match !== null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user