quantizor / markdown-to-jsx

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

fix: correctly parse markdown inside of a table row when a preceding column has nested HTML elements #501

Closed gusbmurphy closed 1 year ago

gusbmurphy commented 1 year ago

This fixes #488. The issue I found was that when parsing HTML within a markdown table row, if there are nested HTML elements, then when we enter the parseBlock function and set state._inline to false, it prevents any rules using inlineRegex or simpleInlineRegex when we move on to process other cells in the table. I also added a very basic test for processing HTML within a table row because I didn't see one there. Interested to hear your feedback on this!