Tags: normalize diacritics in tag slugs (ō → o)

This commit is contained in:
trilium-share-gruvbox
2026-08-29 11:16:00 +02:00
parent 6a18cac86b
commit fd6f7121c2
+1 -1
View File
@@ -288,7 +288,7 @@ function run() {
} }
function slugifyTag(t) { function slugifyTag(t) {
return t.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, ""); return t.normalize("NFKD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
} }
function buildStateMap() { function buildStateMap() {