markdown-to-jsx icon indicating copy to clipboard operation
markdown-to-jsx copied to clipboard

Discrepancies in Slugify output

Open dube25 opened this issue 2 years ago • 0 comments

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:

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?

dube25 avatar Mar 23 '22 02:03 dube25