Skip to content

Commit cfef3fa

Browse files
committed
slugify function fix
1 parent 3e9e484 commit cfef3fa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/helpers.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ export const slugify = (text: string) =>
1919
text
2020
.toLowerCase()
2121
.replace(/[/\\#,+()$~%!@^|`.'":;*?<>{}[\]]/g, "")
22-
.replace(/[ ]/g, "-");
22+
.replace(/[ ]/g, "-")
23+
.replace(/--/g, "");
2324

2425
export const regexify = (field: string) => ({ $regex: field, $options: "i" });
2526

0 commit comments

Comments
 (0)