🐛 Remove accent in filenames

This commit is contained in:
Kazhnuz 2025-02-12 20:12:59 +01:00
parent f538c62f4a
commit 5a3b4e3163

View file

@ -13,6 +13,7 @@ function createFilename(prideflag, text, now = false) {
.replaceAll("⋅", "_") .replaceAll("⋅", "_")
.replaceAll(" ", "_") .replaceAll(" ", "_")
.replaceAll("\n", '-') .replaceAll("\n", '-')
.normalize("NFD").replace(/[\u0300-\u036f]/g, "")
.toLowerCase(); .toLowerCase();
return `${prideflag.name.en.toLowerCase()}-${adaptedText}${now?'-now':''}.png`; return `${prideflag.name.en.toLowerCase()}-${adaptedText}${now?'-now':''}.png`;
} }