Slugify deals with repeating dashes.

This commit is contained in:
DebaucheryLibrarian
2026-01-10 03:00:52 +01:00
parent 7ad2051dd7
commit 8c84839bdd
2 changed files with 1 additions and 3 deletions

View File

@@ -66,7 +66,7 @@ function slugify(strings, delimiter = '-', {
: string;
const normalized = casedString
.replace(/[_-]/g, ' ')
.replace(/[_-]+/g, ' ')
.split('')
.map((char) => {
if (char === ' ') {