markdown-to-jsx
markdown-to-jsx copied to clipboard
Discrepancies in Slugify output
Good day,
For a project, I'm populating a Slug from a translation message key (using Next-Multilingual's slugify feature). I use this slug to target an anchor link that's located on a page that is populated using the markdown-to-jsx library.
The problem I have is that the outputs from the slugify function from the two libraries are different, which are preventing the anchor link that I produce from targeting the section I need to navigate to.
For example, slugifying "Sur le pont d'avignon" gives me the following output:
markdown-to-jsx output: sur-le-pont-davignon
Next-Multilingual output sur-le-pont-d-avignon
Observations:
- markdown-to-jsx's slugify function mentions that it's been taken from a stackoverflow post, admitting that it may not be complete
- Next-Multilingual's Slugify function, on the other hand, seems to have a deeper research backing its function, and it is supporting all Unicode letters and numbers.
Suggestion: I would recommend improving the slugify function in markdown-to-jsx. Not only this would help my particular usecase where I'm integrating code from both libraries, it is a great opportunity to improve the slugify function and no longer admit that it's incomplete.
Any thoughts?