-
Notifications
You must be signed in to change notification settings - Fork 131
Closed
Labels
Description
Slugify is designed to support valid url characters. However if I pass in a forward slash:
slugify(`Something/Another thing`, { lower: true })
The result is:
somethinganother-thing
Where I would expect:
something/another-thing
This can of course be mitigated by changing the remove RegEx adding \/:
console.log(slugify(`Something/Another thing`, { lower: true, remove: /[^\w\s$*_+~.()'"!\-:@\/]+/g }));
But this is not a very elegant solution. Ideally there would be an ignore/exclude character feature?
console.log(slugify(`Something/Another thing`, { lower: true, exclude: '/' }));
Reactions are currently unavailable