Fixed slugify not handling slugs as input.

This commit is contained in:
DebaucheryLibrarian 2026-01-10 03:00:31 +01:00
parent 4e181d5ff7
commit e32dd55220
1 changed files with 2 additions and 1 deletions

View File

@ -40,7 +40,7 @@ const accentMap = {
};
const plainCharRegex = /[a-zA-Z0-9]/;
const defaultPunctuationRegex = /[.,?!:;&'"“”…()[]{}<>\/*—-]/;
const defaultPunctuationRegex = /[.,?!:;&'"“”…()[]{}<>\/*—]/;
const defaultSymbolRegex = /[@$€£#%^+=\\~]/;
export default function slugify(strings, delimiter = '-', {
@ -64,6 +64,7 @@ export default function slugify(strings, delimiter = '-', {
: string;
const normalized = casedString
.replace(/[_-]+/g, ' ')
.split('')
.map((char) => {
if (char === ' ') {