In [1]: import pydash
In [2]: from slugify import slugify
In [3]: print(pydash.slugify("saint peter's university"))
saint-peter's-university
In [4]: print(slugify("saint-peter's"))
saint-peter-s-university
But, using npm slugify package, we have the same result:
I would say that replacing single quote by the separator can be desired in some cases where we want to slugify a string, but that is a backward incompatible change for this function, so maybe adding as an optional parameter to handle those cases in the slugify function can be a option?
Of course we can call slugify and then replace manually afterwards but it would be more elegant and straightforward if handled by the library as well, idk.
Hey, just noticed a behavior that not sure if it is always wanted, so opening this issue to discuss.
How single quoted is handled by pydash slugify function.
In comparison with a widely used slugify specific library: https://github.com/un33k/python-slugify, we have the following difference:
But, using npm slugify package, we have the same result:
I would say that replacing single quote by the separator can be desired in some cases where we want to slugify a string, but that is a backward incompatible change for this function, so maybe adding as an optional parameter to handle those cases in the slugify function can be a option?
Of course we can call slugify and then replace manually afterwards but it would be more elegant and straightforward if handled by the library as well, idk.