Fix: incorrect lowercase for regexp rules (#3066)

This commit is contained in:
Loyalsoldier 2025-12-17 00:17:43 +08:00 committed by GitHub
parent 72eb885658
commit d8bd29ce92
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -143,7 +143,13 @@ func parseDomain(domain string, entry *Entry) error {
if len(kv) == 2 {
entry.Type = strings.ToLower(kv[0])
entry.Value = strings.ToLower(kv[1])
if strings.EqualFold(entry.Type, RuleTypeRegexp) {
entry.Value = kv[1]
} else {
entry.Value = strings.ToLower(kv[1])
}
return nil
}