mirror of
https://github.com/zadam/trilium.git
synced 2025-11-18 03:00:41 +01:00
Fix: Highlighting searched term should ignore accents (#2364)
* fixed accent highlighting not working * fixed * fixes * improvements
This commit is contained in:
@@ -264,7 +264,7 @@ function timeLimit(promise, limitMs, errorMessage) {
|
||||
|
||||
res(result);
|
||||
})
|
||||
.catch(error => rej(error));
|
||||
.catch(error => rej(error));
|
||||
|
||||
setTimeout(() => {
|
||||
if (!resolved) {
|
||||
@@ -302,6 +302,10 @@ function filterAttributeName(name) {
|
||||
return name.replace(/[^\p{L}\p{N}_:]/ug, "");
|
||||
}
|
||||
|
||||
function wrapText(text, start, length, prefix, suffix) {
|
||||
return text.substring(0, start) + prefix + text.substr(start, length) + suffix + text.substring(start + length);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
randomSecureToken,
|
||||
randomString,
|
||||
@@ -336,5 +340,6 @@ module.exports = {
|
||||
deferred,
|
||||
removeDiacritic,
|
||||
normalize,
|
||||
filterAttributeName
|
||||
filterAttributeName,
|
||||
wrapText
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user