Compare commits

...

2 commits

Author SHA1 Message Date
Ell dcfe7e6f3d marks are already replaced in slugify 2023-09-25 22:45:51 +02:00
Ell fb6094a1b8 improve slugify function 2023-09-25 22:37:38 +02:00

View file

@ -48,7 +48,7 @@
ariaHidden: true
}),
// prepend current file id to the anchor permalink
slugify: s => `${getId() ?? ""}-${encodeURIComponent(String(s).trim().toLowerCase().replace(/\s+/g, "-").replace(/[^A-Za-z0-9_-]/g, ""))}`
slugify: s => `${getId() ?? ""}-${encodeURIComponent(String(s).trim().toLowerCase().normalize("NFKD").replace(/\s+/g, "-").replace(/[^a-z0-9_-]/g, ""))}`
});
md.use(markdownitFootnote);