Browse Source

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]
tags/v1.1.0
Shivaram Lingamneni 5 years ago
parent
commit
b075ea6eb9
2 changed files with 5 additions and 5 deletions
  1. 1
    1
      irc/strings.go
  2. 4
    4
      irc/strings_test.go

+ 1
- 1
irc/strings.go View File

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

+ 4
- 4
irc/strings_test.go View File

@@ -153,15 +153,15 @@ func TestSkeleton(t *testing.T) {
153 153
 		return skel
154 154
 	}
155 155
 
156
-	if skeleton("warning") == skeleton("waming") {
157
-		t.Errorf("Oragono shouldn't consider rn confusable with m")
156
+	if skeleton("warning") != skeleton("waming") {
157
+		t.Errorf("i give up, Oragono should consider rn confusable with m")
158 158
 	}
159 159
 
160 160
 	if skeleton("Phi|ip") != "philip" {
161 161
 		t.Errorf("but we still consider pipe confusable with l")
162 162
 	}
163 163
 
164
-	if skeleton("smt") != "smt" {
164
+	if skeleton("smt") != skeleton("smt") {
165 165
 		t.Errorf("fullwidth characters should skeletonize to plain old ascii characters")
166 166
 	}
167 167
 
@@ -169,7 +169,7 @@ func TestSkeleton(t *testing.T) {
169 169
 		t.Errorf("after skeletonizing, we should casefold")
170 170
 	}
171 171
 
172
-	if skeleton("smt") != "smt" {
172
+	if skeleton("smt") != skeleton("smt") {
173 173
 		t.Errorf("our friend lover successfully tricked the skeleton algorithm!")
174 174
 	}
175 175
 

Loading…
Cancel
Save