Use NFKD normalization instead of NFD

This commit is contained in:
Régis Hanol 2018-08-24 00:52:53 +02:00
parent bc7b530b0a
commit c26de01399
1 changed files with 1 additions and 1 deletions

View File

@ -193,7 +193,7 @@ class SearchIndexer
DIACRITICS ||= /([\u0300-\u036f]|[\u1AB0-\u1AFF]|[\u1DC0-\u1DFF]|[\u20D0-\u20FF])/
def characters(string)
scrubbed << " #{string.unicode_normalize(:nfd).gsub(DIACRITICS, "").strip} "
scrubbed << " #{string.unicode_normalize(:nfkd).gsub(DIACRITICS, "").strip} "
end
end
end