jayjun / slugify

An Elixir library to convert strings in any language into slugs
MIT License
124 stars 10 forks source link

Support for punctuation in the :ignore option #10

Closed simedw closed 4 years ago

simedw commented 4 years ago

Hi, thanks for a great library.

I have a use case in which I needed to ignore underscores, but since they are part of [:punct:] using ignore: "_" didn't work.

In this PR I extracted out the :punct: to a list of characters and then filter out the ignored_codepoints.

simedw commented 4 years ago

Thanks for the feedback @jayjun , I have updated the PR.

jayjun commented 4 years ago

👍👌🤝👊🤘