From 94b64cc20a5d58ef5b1faf493c7b8c2471c6efeb Mon Sep 17 00:00:00 2001 From: phvm Date: Mon, 28 Oct 2024 09:09:30 -0300 Subject: [PATCH] fix: slugify parsing --- src/utils/string-utils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils/string-utils.ts b/src/utils/string-utils.ts index e5e1d4d..4eea4d4 100644 --- a/src/utils/string-utils.ts +++ b/src/utils/string-utils.ts @@ -12,9 +12,10 @@ export const toCamelCase = (str: string) => { export const slugify = (str: string) => { return str .toLowerCase() + .normalize('NFD') + .replace(/[\u0300-\u036f]/g, '') .replace(/\s+/g, '-') .replace(/\-+/g, '-') - .replace(/[^a-z0-9\-]/g, '') } type Child = string | { props: { children: Child[] } }