From c60ed2c4033dc04327bf9807decd822cd5be99ec Mon Sep 17 00:00:00 2001 From: n1073645 Date: Thu, 21 Nov 2019 09:56:52 +0000 Subject: [PATCH] Linting on regex operation --- .../operations/ToCaseInsensitiveRegex.mjs | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/core/operations/ToCaseInsensitiveRegex.mjs b/src/core/operations/ToCaseInsensitiveRegex.mjs index 32c14a3c..9467b8c8 100644 --- a/src/core/operations/ToCaseInsensitiveRegex.mjs +++ b/src/core/operations/ToCaseInsensitiveRegex.mjs @@ -53,32 +53,32 @@ class ToCaseInsensitiveRegex extends Operation { // Example: [test] -> [[tT][eE][sS][tT]] return preProcess(input) - // Example: [A-Z] -> [A-Za-z] - .replace(/[A-Z]-[A-Z]/ig, m => `${m[0].toUpperCase()}-${m[2].toUpperCase()}${m[0].toLowerCase()}-${m[2].toLowerCase()}`) + // Example: [A-Z] -> [A-Za-z] + .replace(/[A-Z]-[A-Z]/ig, m => `${m[0].toUpperCase()}-${m[2].toUpperCase()}${m[0].toLowerCase()}-${m[2].toLowerCase()}`) - // Example: [H-d] -> [A-DH-dh-z] - .replace(/[A-Z]-[a-z]/g, m => `A-${m[2].toUpperCase()}${m}${m[0].toLowerCase()}-z`) + // Example: [H-d] -> [A-DH-dh-z] + .replace(/[A-Z]-[a-z]/g, m => `A-${m[2].toUpperCase()}${m}${m[0].toLowerCase()}-z`) - // Example: [!-D] -> [!-Da-d] - .replace(/\\?[ -@]-[A-Z]/g, m => `${m}a-${m[2].toLowerCase()}`) + // Example: [!-D] -> [!-Da-d] + .replace(/\\?[ -@]-[A-Z]/g, m => `${m}a-${m[2].toLowerCase()}`) - // Example: [%-^] -> [%-^a-z] - .replace(/\\?[ -@]-\\?[[-`]/g, m => `${m}a-z`) + // Example: [%-^] -> [%-^a-z] + .replace(/\\?[ -@]-\\?[[-`]/g, m => `${m}a-z`) - // Example: [K-`] -> [K-`k-z] - .replace(/[A-Z]-\\?[[-`]/g, m => `${m}${m[0].toLowerCase()}-z`) + // Example: [K-`] -> [K-`k-z] + .replace(/[A-Z]-\\?[[-`]/g, m => `${m}${m[0].toLowerCase()}-z`) - // Example: [[-}] -> [[-}A-Z] - .replace(/\\?[[-`]-\\?[{-~]/g, m => `${m}A-Z`) + // Example: [[-}] -> [[-}A-Z] + .replace(/\\?[[-`]-\\?[{-~]/g, m => `${m}A-Z`) - // Example: [b-}] -> [b-}B-Z] - .replace(/[a-z]-\\?[{-~]/g, m => `${m}${m[0].toUpperCase()}-Z`) + // Example: [b-}] -> [b-}B-Z] + .replace(/[a-z]-\\?[{-~]/g, m => `${m}${m[0].toUpperCase()}-Z`) - // Example: [<-j] -> [<-z] - .replace(/\\?[ -@]-[a-z]/g, m => `${m[0]}-z`) + // Example: [<-j] -> [<-z] + .replace(/\\?[ -@]-[a-z]/g, m => `${m[0]}-z`) - // Example: [^-j] -> [A-J^-j] - .replace(/\\?[[-`]-[a-z]/g, m => `A-${m[2].toUpperCase()}${m}`); + // Example: [^-j] -> [A-J^-j] + .replace(/\\?[[-`]-[a-z]/g, m => `A-${m[2].toUpperCase()}${m}`); } }