Fix: salvaged adgaurd rules should match original domain

This commit is contained in:
SukkaW 2025-01-04 03:30:17 +08:00
parent 99aa449d57
commit 0540c1de21
2 changed files with 4 additions and 3 deletions

View File

@ -14,6 +14,6 @@ export const loosTldOptWithPrivateDomains: Parameters<typeof tldts.getSubdomain>
}; };
export const normalizeTldtsOpt: Parameters<typeof tldts.getSubdomain>[1] = { export const normalizeTldtsOpt: Parameters<typeof tldts.getSubdomain>[1] = {
allowPrivateDomains: true allowPrivateDomains: true,
// detectIp: true detectIp: true
}; };

View File

@ -575,7 +575,8 @@ export function parse($line: string, result: [string, ParseType], allowThirdPart
} }
const domain = normalizeDomain(sliced); const domain = normalizeDomain(sliced);
if (domain) {
if (domain && domain === sliced) {
result[0] = domain; result[0] = domain;
if (white) { if (white) {