You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would it be possible to make the patternSlug configurable, so for example if we want to have # in our slug, we could do something like slugify('foo#bar hello$123', {patternSlug: /[^a-zA-Z#\d]+/g}); to get foo#bar-hello-123.
Would be really amazing feature :-)
The text was updated successfully, but these errors were encountered:
I don't want to expose the pattern slug regex, as it's an implementation detail, and this would lock us into that way of doing it forever. I would be open to an option to preserve a set of given characters, but I think in your case, it would be simpler for you to just split it on #, run the parts through slugify, and then join again.
Hello,
Would it be possible to make the
patternSlug
configurable, so for example if we want to have#
in our slug, we could do something likeslugify('foo#bar hello$123', {patternSlug: /[^a-zA-Z#\d]+/g});
to getfoo#bar-hello-123
.Would be really amazing feature :-)
The text was updated successfully, but these errors were encountered: