mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-16 05:39:24 +00:00
fix(common/lmlayer): correct Unicode range in default key fn
This commit is contained in:
parent
36c5f956b9
commit
c33524e078
1 changed files with 4 additions and 1 deletions
|
|
@ -429,7 +429,10 @@
|
|||
*/
|
||||
function defaultWordform2Key(wordform: string): SearchKey {
|
||||
return wordform
|
||||
.replace(/[\u0100-\u2200]/g, function (c) {
|
||||
// remove all combining diacritics (if input is in NFD)
|
||||
.replace(/[\u0300-\u036f]/g, '')
|
||||
// remove all composed diacritics (if input is in NFC) LATIN-ONLY!
|
||||
.replace(/[\u00C0-\u212A]/g, function (c) {
|
||||
if (c in PARTIAL_NFD_LOOKUP) {
|
||||
return PARTIAL_NFD_LOOKUP[c];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue