From 66ae001963ed4763ae3909084e39d253154f1b08 Mon Sep 17 00:00:00 2001 From: Gitoffthelawn Date: Tue, 13 Dec 2022 17:09:59 -0800 Subject: [PATCH] Simplify const declaration for regex I'm not sure about this... I noticed this strange literal within this `const` declaration. If this literal is not needed, please accept the PR. If it's needed, please reject the PR, and if you have time, explain why the matching that literal within the pattern is needed. It looks like perhaps a literal for an exception that is possibly no longer needed. --- src/background/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/background/utils.ts b/src/background/utils.ts index 5d43a962..3c82760c 100644 --- a/src/background/utils.ts +++ b/src/background/utils.ts @@ -21,7 +21,7 @@ export class Utils { matchDomainPattern(url: string, domainPattern: string): boolean { if (domainPattern.startsWith('/')) { - const regexp = domainPattern.match(/^\s*\/(.*)\/([gimsuy]+)?\s*$/); + const regexp = domainPattern.match(/^\s*\/(.*)\/\s*$/); if (!regexp) { return false; }