Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

possibly wrong "loose item"? #92

Closed
Xunius opened this issue Mar 18, 2016 · 2 comments
Closed

possibly wrong "loose item"? #92

Xunius opened this issue Mar 18, 2016 · 2 comments
Labels

Comments

@Xunius
Copy link

Xunius commented Mar 18, 2016

Hi dev,

I'm testing out this module and comparing the output with that from markdown2, and I noticed some differences that I guess markdown2 gets it right. Here is the code snippet I used followed by the outputs:

code:

import mistune
import markdown2

text='''this is test _**bold test**_ of markdown ** parser
test.

- item1;
- item2;
- item3.

1. num1;
2. num2;
3. num3.
'''

markdown = mistune.Markdown()
out=markdown(text)
out2=markdown2.markdown(text)

print text
print '\n'
print out
print '\n'
print out2

Output:

this is test _**bold test**_ of markdown ** parser
test.

- item1;
- item2;
- item3.

1. num1;
2. num2;
3. num3.



<p>this is test <em><strong>bold test</strong></em> of markdown ** parser
test.</p>
<ul>
<li>item1;</li>
<li>item2;</li>
<li><p>item3.</p>
</li>
<li><p>num1;</p>
</li>
<li>num2;</li>
<li>num3.</li>
</ul>



<p>this is test <em><strong>bold test</strong></em> of markdown ** parser
test.</p>

<ul>
<li>item1;</li>
<li>item2;</li>
<li>item3.</li>
</ul>

<ol>
<li>num1;</li>
<li>num2;</li>
<li>num3.</li>
</ol>

Seems that the "loose item" logic leads to the difference. And the 2nd numbered list is not recognized correctly.

@lepture lepture added the bug label Jun 1, 2017
@lepture lepture modified the milestone: Mistune 0.8 Jun 1, 2017
@zopieux
Copy link

zopieux commented Dec 22, 2017

I was just hit by that bug trying to implement a custom renderer. I do not understand what is the definition of a loose item, so I can't suggest a fix. Any idea @lepture?

@lepture lepture removed this from the Mistune 0.8 milestone Feb 4, 2018
@lepture
Copy link
Owner

lepture commented Sep 15, 2018

Fixed by #152

@lepture lepture closed this as completed Sep 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants