Fix problem with 'ь' in search (#1512)

Config.LatinizeMap have rule for 'ь' but it are not applied.
This commit is contained in:
Aleksey Veselovskiy 2017-12-08 22:37:55 +03:00 committed by Igor Zhukov
parent 0e1631d410
commit 15fdefcc19

View File

@ -477,7 +477,8 @@ function versionCompare (ver1, ver2) {
var hasTag = text.charAt(0) == '%'
text = text.replace(badCharsRe, ' ').replace(trimRe, '')
text = text.replace(/[^A-Za-z0-9]/g, function (ch) {
return Config.LatinizeMap[ch] || ch
var latinizeCh = Config.LatinizeMap[ch]
return latinizeCh !== undefined ? latinizeCh : ch
})
text = text.toLowerCase()
if (hasTag) {