🐛 Remove accent in filenames
This commit is contained in:
parent
f538c62f4a
commit
5a3b4e3163
1 changed files with 1 additions and 0 deletions
1
main.js
1
main.js
|
@ -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`;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue