Skip to content

Commit 44713ad

Browse files
committed
Transliterate into unicode_normalize(ed) strings, and compare unicode-normalized strings, fixes #238
1 parent 0f5ee45 commit 44713ad

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/interscript.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ def transliterate(system_code, string)
6262
output.gsub!(/#{word_separator}#{separator}/,word_separator)
6363
output.gsub!(/#{word_separator}(.)/, &:upcase) if title_case
6464
end
65-
end
65+
end
6666

67-
output
67+
output.unicode_normalize
6868
end
6969

7070
private

spec/interscript_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
system["tests"]&.reduce([]) do |testresults, test|
1111
it "test for #{test}" do
1212
result = Interscript.transliterate system_name, test["source"]
13-
expect(result).to eq(test["expected"])
13+
expect(result.unicode_normalize).to eq(test["expected"].unicode_normalize)
1414
end
1515
end
1616
end

0 commit comments

Comments
 (0)