Slugify deals with repeating dashes.
This commit is contained in:
@@ -66,7 +66,7 @@ function slugify(strings, delimiter = '-', {
|
||||
: string;
|
||||
|
||||
const normalized = casedString
|
||||
.replace(/[_-]/g, ' ')
|
||||
.replace(/[_-]+/g, ' ')
|
||||
.split('')
|
||||
.map((char) => {
|
||||
if (char === ' ') {
|
||||
|
||||
Reference in New Issue
Block a user