I've run into some unexpected behavior while parsing markdown documents with inline HTML.
Take this markdown for example:
<div>
# Test
test test test
</div>
When parsed, this is what I would expect:
<div>
<h1>Test</h1>
<p>test test test</p>
</div>
But that is not what results. This is the output from running the markdown through Markdown.markdownToHTML:
<div>
<h1>Test</h1>
<p>test test test</p>
<p></div></p>
As you can see, there are p tags surrounding the closing div. Now, this will render just fine in browsers, but it is not correct HTML. If there are no problems with it, I would suggest making the parse match the expected result I show. I might be able to help, but I would need some guidance on what to change.
I've run into some unexpected behavior while parsing markdown documents with inline HTML.
Take this markdown for example:
When parsed, this is what I would expect:
But that is not what results. This is the output from running the markdown through
Markdown.markdownToHTML
:As you can see, there are p tags surrounding the closing div. Now, this will render just fine in browsers, but it is not correct HTML. If there are no problems with it, I would suggest making the parse match the expected result I show. I might be able to help, but I would need some guidance on what to change.