mirror of
https://github.com/SukkaW/Surge.git
synced 2026-02-03 12:31:54 +08:00
Chore: update ESLint config
This commit is contained in:
@@ -182,7 +182,7 @@ function matchWithRegExpArray(input, regexps = []) {
|
||||
|
||||
function escapeRegExp(string = '') {
|
||||
const reRegExpChar = /[$()*+.?[\\\]^{|}]/g;
|
||||
const reHasRegExpChar = RegExp(reRegExpChar.source);
|
||||
const reHasRegExpChar = new RegExp(reRegExpChar.source);
|
||||
|
||||
return string && reHasRegExpChar.test(string)
|
||||
? string.replaceAll(reRegExpChar, '\\$&')
|
||||
|
||||
Reference in New Issue
Block a user