3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-10 22:19:31 +01:00

have realSkeleton use cases.Fold as well

This commit is contained in:
Shivaram Lingamneni 2019-12-18 08:19:36 -05:00
parent 91d6888b7e
commit f9b5224ae0

View File

@ -12,7 +12,6 @@ import (
"github.com/oragono/confusables" "github.com/oragono/confusables"
"golang.org/x/text/cases" "golang.org/x/text/cases"
"golang.org/x/text/language"
"golang.org/x/text/secure/precis" "golang.org/x/text/secure/precis"
"golang.org/x/text/unicode/norm" "golang.org/x/text/unicode/norm"
"golang.org/x/text/width" "golang.org/x/text/width"
@ -198,7 +197,7 @@ func realSkeleton(name string) (string, error) {
// violate the bidi rule). We also don't care if they contain runes // violate the bidi rule). We also don't care if they contain runes
// that are disallowed by PRECIS, because every identifier must independently // that are disallowed by PRECIS, because every identifier must independently
// pass PRECIS --- we are just further canonicalizing the skeleton. // pass PRECIS --- we are just further canonicalizing the skeleton.
return cases.Lower(language.Und).String(name), nil return cases.Fold().String(name), nil
} }
// maps a nickmask fragment to an expanded, casefolded wildcard: // maps a nickmask fragment to an expanded, casefolded wildcard: