mirror of
https://github.com/zadam/trilium.git
synced 2025-11-18 03:00:41 +01:00
search should ignore diacritics, closes #2182
This commit is contained in:
@@ -290,6 +290,14 @@ function deferred() {
|
||||
})();
|
||||
}
|
||||
|
||||
function removeDiacritic(str) {
|
||||
return str.normalize("NFD").replace(/\p{Diacritic}/gu, "");
|
||||
}
|
||||
|
||||
function normalize(str) {
|
||||
return removeDiacritic(str).toLowerCase();
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
randomSecureToken,
|
||||
randomString,
|
||||
@@ -321,5 +329,7 @@ module.exports = {
|
||||
removeTextFileExtension,
|
||||
formatDownloadTitle,
|
||||
timeLimit,
|
||||
deferred
|
||||
deferred,
|
||||
removeDiacritic,
|
||||
normalize
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user