3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-12-22 10:42:52 +01:00

use regular Skeleton instead of SkeletonTweaked

dan: "I probably wouldn't expect those mappings to cause much
trouble at all for legitimate users at the end of the day"

shivaram: [concurs]
This commit is contained in:
Shivaram Lingamneni 2019-06-24 00:14:39 -04:00
parent 990d76923c
commit b075ea6eb9
2 changed files with 5 additions and 5 deletions

View File

@ -148,7 +148,7 @@ func Skeleton(name string) (string, error) {
// same as PRECIS: // same as PRECIS:
name = width.Fold.String(name) name = width.Fold.String(name)
name = confusables.SkeletonTweaked(name) name = confusables.Skeleton(name)
// internationalized lowercasing for skeletons; this is much more lenient than // internationalized lowercasing for skeletons; this is much more lenient than
// Casefold. In particular, skeletons are expected to mix scripts (which may // Casefold. In particular, skeletons are expected to mix scripts (which may

View File

@ -153,15 +153,15 @@ func TestSkeleton(t *testing.T) {
return skel return skel
} }
if skeleton("warning") == skeleton("waming") { if skeleton("warning") != skeleton("waming") {
t.Errorf("Oragono shouldn't consider rn confusable with m") t.Errorf("i give up, Oragono should consider rn confusable with m")
} }
if skeleton("Phi|ip") != "philip" { if skeleton("Phi|ip") != "philip" {
t.Errorf("but we still consider pipe confusable with l") t.Errorf("but we still consider pipe confusable with l")
} }
if skeleton("") != "smt" { if skeleton("") != skeleton("smt") {
t.Errorf("fullwidth characters should skeletonize to plain old ascii characters") t.Errorf("fullwidth characters should skeletonize to plain old ascii characters")
} }
@ -169,7 +169,7 @@ func TestSkeleton(t *testing.T) {
t.Errorf("after skeletonizing, we should casefold") t.Errorf("after skeletonizing, we should casefold")
} }
if skeleton("sm") != "smt" { if skeleton("sm") != skeleton("smt") {
t.Errorf("our friend lover successfully tricked the skeleton algorithm!") t.Errorf("our friend lover successfully tricked the skeleton algorithm!")
} }