quantizor / markdown-to-jsx

🏭 The most lightweight, customizable React markdown component.
https://markdown-to-jsx.quantizor.dev/
MIT License
2.03k stars 176 forks source link

Misinterpreting *italics*normal*italics* #612

Open MichalPaszowski opened 3 weeks ago

MichalPaszowski commented 3 weeks ago

Library seems to have problem with correct interpretation of strings like this *italics*normal*italics*. Instead of showing italicsnormalitalics it behaves like it is put in code block and prints string as is. Is it a bug, or a feature? Can I somehow alter how library deals with that?

quantizor commented 1 week ago

The behavior for this scenario is a bit ambiguous since it appears to be all one word, I made the decision to parse the outermost syntax first. Therefore for *italics*normal*italics* the whole string would be italic. If you put a space before "normal" then it will break the italics, e.g. *italics* normal *italics*

MichalPaszowski commented 1 week ago

I am aware of that, but most libraries that I have tested - Github included, deal with it in a way I have described. I can offer help in making a change, if time is a factor here.