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

Extra closing tag when html is rendered (like </div>)

Open KonstantinBulgakov opened this issue 2 years ago • 1 comments

Hello, markdown-to-jsx is used in our service for working with existing content in html (we have a lot of content in html as legacy) and for creating and editing new content in Markdown.

Some of our html content has deep nested elements. But I found out that in this case markdown-to-jsx adds extra closing tag (like ) into a result after a 2nd level of nesting. Is there a way to prevent it?

image

KonstantinBulgakov avatar Dec 08 '22 11:12 KonstantinBulgakov

As stated in the readme, HTML handling is really challenging and we do best-effort handling of it. Ultimately, including a real HTML parser would bloat the library beyond a useful size. If you want to try improving what we have to handle your use case, you’re welcome to assuming you do not introduce significant bundle weight.

quantizor avatar Jan 31 '23 03:01 quantizor