fix(geo.js): ISO Code at Start/End of String (#137)

This commit is contained in:
Peng-YM 2022-06-28 12:52:48 +08:00
parent f1c8d85ddc
commit 03d4d6e918
5 changed files with 11 additions and 11 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{
"name": "sub-store",
"version": "2.1.3",
"version": "2.1.4",
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
"main": "src/main.js",
"scripts": {

View File

@ -405,7 +405,7 @@ export function getFlag(name) {
if (
// 精确匹配(两侧均有分割)
keywords.some((keyword) =>
RegExp(`[^a-zA-Z]${keyword}[^a-zA-Z]`).test(name),
RegExp(`(^|[^a-zA-Z])${keyword}([^a-zA-Z]|$)`).test(name),
)
) {
//console.log(`ISOFlag = ${flag}`)

File diff suppressed because one or more lines are too long