mirror of
https://github.com/Steffo99/sophon.git
synced 2024-12-22 14:54:22 +00:00
🐛 Fixes #84
This commit is contained in:
parent
3319dd7ef7
commit
541da3b27b
1 changed files with 2 additions and 2 deletions
|
@ -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()
|
||||||
}
|
}
|
Loading…
Reference in a new issue