bhollis / maruku

A pure-Ruby Markdown-superset interpreter (Official Repo).
MIT License
500 stars 80 forks source link

Problem with inline HTML embedding generation #74

Closed mfcabrera closed 11 years ago

mfcabrera commented 11 years ago

Hi I am using Jekyll to generate my blog and I am getting bad generation of the HTML. In order to test I used another markdown processor with Jekyll and it worked. I also used the command line utility and it generated the same wrong HTML:

Here is the snippet:

## Cool Title

<ul>
    <li>Cool Text yada yada</li>
    <li>ICool Tex 2 yada yada</li>
</ul>

<p id="icons">
    <a href="" class="stumbleupon" target="_blank"></a>
    <a href="" class="stumbleupon" target="_blank"></a>
    <a href="" class="stumbleupon" target="_blank"></a>
</p>

## Recents Post

It generates:

<h2 id="miguel_cabrera">Miguel Cabrera</h2>
<ul>
      <li>Cool Text yada yada</li>
    <li>ICool Tex 2 yada yada</li>
</ul><p id="icons">
    <a class="stumbleupon" href="" target="_blank">
    </a><a class="stumbleupon" href="" target="_blank">
    </a><a class="stumbleupon" href="" target="_blank">
</a></p><a class="stumbleupon" href="" target="_blank">
<h2 id="recent_posts">Recent Posts</h2>
...

Please mind how the <p> is wrongly closed after the start pf the last <a>. I am using maruku 0.6.1 - kramdown 0.13.8 generates correctly the HTML.

bhollis commented 11 years ago

Thanks for the report. I'll make sure we have a test, but I think the master branch has recently gotten a fix for this problem if you want to try it out.

bhollis commented 11 years ago

I've committed a passing test that proves this is working on the master branch.