🐛 修复(substore): 避免特征尾号和 HY2 误判
This commit is contained in:
+12
-2
@@ -2,7 +2,7 @@
|
||||
* Sub-Store 节点命名公共工具
|
||||
*
|
||||
* 远程引用地址:
|
||||
* https://git.orionc.me/orion/script/raw/branch/main/substore/common.js?v=20260603-5
|
||||
* https://git.orionc.me/orion/script/raw/branch/main/substore/common.js?v=20260603-6
|
||||
*/
|
||||
(function (root) {
|
||||
const regexSpecialChars = new Set(['.', '*', '+', '?', '^', '$', '{', '}', '(', ')', '|', '[', ']', '\\']);
|
||||
@@ -206,8 +206,18 @@
|
||||
match,
|
||||
prefix,
|
||||
regionCode,
|
||||
sequenceNumber
|
||||
sequenceNumber,
|
||||
offset,
|
||||
input
|
||||
) => {
|
||||
if (
|
||||
prefix === ' ' &&
|
||||
offset > 1 &&
|
||||
/^[A-Z]{2}$/.test(input.slice(offset - 2, offset))
|
||||
) {
|
||||
return match;
|
||||
}
|
||||
|
||||
return `${prefix}${regionCode} ${sequenceNumber.padStart(2, '0')}`;
|
||||
})
|
||||
.replace(new RegExp(`(\\b${regionPattern} \\d{2})-\\s*(?=\\d+(?:\\.\\d+)?X\\b)`, 'g'), '$1 ')
|
||||
|
||||
Reference in New Issue
Block a user