diff --git a/frontend/src/utils/Slug.ts b/frontend/src/utils/Slug.ts index 072b54c..22f7b4e 100644 --- a/frontend/src/utils/Slug.ts +++ b/frontend/src/utils/Slug.ts @@ -1,3 +1,3 @@ export function toSlug(str: string): string { - return str.replaceAll(/[^A-Za-z0-9-]/g, "-").toLowerCase() -} \ No newline at end of file + return str.replaceAll(/[^A-Za-z0-9-]/g, " ").trim().replaceAll(" ", "-").toLowerCase() +}