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:
parent
990d76923c
commit
b075ea6eb9
@ -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
|
||||||
|
@ -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") != "smt" {
|
if skeleton("smt") != 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("smt") != "smt" {
|
if skeleton("smt") != skeleton("smt") {
|
||||||
t.Errorf("our friend lover successfully tricked the skeleton algorithm!")
|
t.Errorf("our friend lover successfully tricked the skeleton algorithm!")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user