DomainSet emits at most one exact entry and one suffix-only entry for each domain. Sorting without the leading dot makes matching pairs adjacent, so they can be combined in place.
Replace per-entry binary searches and the separate rule slice with an adjacent pairing pass. Merge pairs into +.domain, remove consumed entries from the original slice, and sort the resulting rules by their full text.
Add regression coverage for multiple pairs and wildcard ordering. Output semantics and early termination remain unchanged.
The +.domain syntax includes both the domain itself and its subdomains. Using it for a suffix-only terminal adds an unintended exact match when the output is reinserted and can overwrite a separately stored exact value.
Emit .domain for suffix-only entries in DomainTrie and DomainSet Foreach, keeping exact entries separate. Preserve the internal '+' marker when converting Trie to Set, and combine MRS entries into +.domain only when both exact and suffix entries exist.
Add regression coverage for matching behavior and distinct values after reinsertion, as well as MRS deduplication and compact output. Query logic and binary layouts remain unchanged.
when a PASS-RULE is hit in a sub-rule, the sub-rule will not be skipped; instead, the currently hit rule branch will be skipped, and the matching of rules will continue in the sub-rule.
The original upstream does not support it, and there are many places in the current code that do not support it either. Removing it will help maintain consistency in behavior across different parts.
strings.Split will never return a slice of length 0 if sep is not empty, so any code that checks if the return value is of length 0 is incorrect and useless.