mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2026-03-20 07:52:36 +08:00
fix(geo.js): ISO Code at Start/End of String (#137)
This commit is contained in:
@@ -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}`)
|
||||
|
||||
Reference in New Issue
Block a user