In ignores, normalize the input when parsing it. When scanning, normalize earlier such that the path is already normalized when checking ignores. This requires splitting normalization of the string from normalization of the file, as we don't want to attempt the latter if the file is ignored. Closes #9598 --------- Co-authored-by: Jakob Borg <jakob@kastelo.net>
This commit is contained in:
@@ -805,7 +805,10 @@ func TestIssue3174(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if !pats.Match("åäö").IsIgnored() {
|
||||
// The pattern above is normalized when parsing, and in order for this
|
||||
// string to match the pattern, it needs to use the same normalization. And
|
||||
// Go always uses NFC regardless of OS, while we use NFD on macos.
|
||||
if !pats.Match(nativeUnicodeNorm("åäö")).IsIgnored() {
|
||||
t.Error("Should match")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user