talha-asad / mongoose-url-slugs

Create URL compatiable slugs on mongoose models, ensuring uniqueness.
MIT License
40 stars 22 forks source link

Generator text is tainted by removeDiacritics #45

Open smesterheide opened 6 years ago

smesterheide commented 6 years ago

Hello, I am using a custom generator to handle umlauts in my slugs. The text passed to the generator function is already pre-processed to remove diacritics which defeats the purpose. Just wanted to make other people aware of it.

Here is a quick fix to additionally pass the original text: https://github.com/notapianokey/mongoose-url-slugs/commit/72398ba88b0c62e24d80123d14b759472ad19c63

Great plugin otherwise! Thank you