1
Fork 0
mirror of https://github.com/Steffo99/sophon.git synced 2024-12-22 06:44:21 +00:00

🐛 Fixes #84

This commit is contained in:
Steffo 2021-11-05 14:12:32 +01:00
parent 3319dd7ef7
commit 541da3b27b
Signed by: steffo
GPG key ID: 6965406171929D01

View file

@ -1,3 +1,3 @@
export function toSlug(str: string): string { export function toSlug(str: string): string {
return str.replaceAll(/[^A-Za-z0-9-]/g, "-").toLowerCase() return str.replaceAll(/[^A-Za-z0-9-]/g, " ").trim().replaceAll(" ", "-").toLowerCase()
} }