Skip to content

Commit fafe008

Browse files
committed
Fix unicode escape in confusable data
1 parent f542a90 commit fafe008

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

modules/confusables_data.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -748,8 +748,8 @@
748748
"⃩": "⃩",
749749
"꙯": "⃩",
750750
" ": " ",
751-
"": " ",
752-
"": " ",
751+
"\u2028": " ",
752+
"\u2029": " ",
753753
" ": " ",
754754
" ": " ",
755755
" ": " ",

tools/confusables.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,14 @@ def quote(s)
9191
usable_confusables_key.include?(g)
9292
}.collect{ |g, v|
9393
v.collect{ |vv|
94+
# Generate invalid pyhton code
95+
if vv == "\u2028"
96+
" \"\\u2028\": #{quote(g)}"
97+
elsif vv == "\u2029"
98+
" \"\\u2029\": #{quote(g)}"
99+
else
94100
" #{quote(vv)}: #{quote(g)}"
101+
end
95102
}
96103
}.flatten.join(",\n")
97104
puts "}"

0 commit comments

Comments
 (0)