diff --git a/src/api/api.data.ts b/src/api/api.data.ts index 7a585ee9ef..4899a6ccec 100644 --- a/src/api/api.data.ts +++ b/src/api/api.data.ts @@ -87,9 +87,9 @@ function slugify(text: string): string { // Replace special characters .replace(/[\s~`!@#$%^&*()\-_+=[\]{}|\\;:"'<>,.?/]+/g, '-') // Remove continuous separators - .replace(/\-{2,}/g, '-') + .replace(/-{2,}/g, '-') // Remove prefixing and trailing separators - .replace(/^\-+|\-+$/g, '') + .replace(/^-+|-+$/g, '') // ensure it doesn't start with a number (#121) .replace(/^(\d)/, '_$1') // lowercase