FSX / misaka

A Python binding for Hoedown.
http://misaka.61924.nl
MIT License
420 stars 65 forks source link

Misaka output different from sundown #36

Closed carlopires closed 9 years ago

carlopires commented 11 years ago

This MD snippet:

1. Ordered item

   You can have properly indented paragraphs within list items.
   Notice the blank line above, and the leading spaces (at least
   one, but we'll use three here to also align the raw Markdown).

   To have a line break without a paragraph, you will need to use two trailing spaces.  
   Note that this line is separate, but within the same paragraph.

Is rendered with sundown as:

bash$ ~/sundown/sundown test.markdown 
<ol>
<li><p>Ordered item</p>

<p>You can have properly indented paragraphs within list items.
Notice the blank line above, and the leading spaces (at least
one, but we&#39;ll use three here to also align the raw Markdown).</p>

<p>To have a line break without a paragraph, you will need to use two trailing spaces.<br>
Note that this line is separate, but within the same paragraph.</p></li>
</ol>

But misaka renders LI tag different:

In [1]: import misaka as m
In [2]: m.__version__
Out[2]: '1.0.2'
In [3]: markup = open('/tmp/test.markdown').read()
In [4]: html = m.html(markup)
In [5]: print html
<ol>
<li>Ordered item</li>
</ol>

<p>You can have properly indented paragraphs within list items.
   Notice the blank line above, and the leading spaces (at least
   one, but we&#39;ll use three here to also align the raw Markdown).</p>

<p>To have a line break without a paragraph, you will need to use two trailing spaces.<br>
   Note that this line is separate, but within the same paragraph.</p>
carlopires commented 11 years ago

Please close this as fixed. I just upgraded to github version and got the right output:

In [1]: import misaka as m
In [2]: m.__version__
Out[2]: '1.0.3'
In [2]: markup = open('/tmp/test.markdown').read()
In [3]: print m.html(markup)
<ol>
<li><p>Ordered item</p>

<p>You can have properly indented paragraphs within list items.
Notice the blank line above, and the leading spaces (at least
one, but we&#39;ll use three here to also align the raw Markdown).</p>

<p>To have a line break without a paragraph, you will need to use two trailing spaces.<br>
Note that this line is separate, but within the same paragraph.</p></li>
</ol>

Would it an excuse to upgrade the pypi version?

FSX commented 11 years ago

Sure, I'll leave the ticket open and close it when I uploaded it to PyPi.

Should be done on Tuesday.