bobtfish/text-markdown

Incorrectly parses certain embedded html

Opened this issue · 1 comments

The following html (which was embedded in a large markdown file):

<!-- comment -->
<style>
</style>
<div>
</div>
<!-- comment -->

is incorrectly converted into:

<!-- comment -->
<style>
</style>

1c450cea280a1905a112821f9f56ad46

<!-- comment -->

This occurs for any HTML block following the style section (ie, form, p).

This problem occurs when processing any block level element that is surrounded by an HTML comment. A mimimal test case is:

<!--

<div></div>

-->

This is because we hashify block level elements, and then we hashify comments, but we don't continue de-hashing until there are no more hashes.

Fixed: #31