mdiep / MMMarkdown

An Objective-C framework for converting Markdown to HTML.
MIT License
1.25k stars 168 forks source link

Markdown of OL with UL is outputted in not Good HTML. #15

Closed lenlenlen closed 8 years ago

lenlenlen commented 10 years ago

Thank you published a very nice program. Please let me bug reports today.

In the case of this example, MMMarkdown is not correctly changed into HTML.

【Example Markdown】

1.test
2.tester
3.testing

*boxing
*kick boxing
*karate

【Result HTML】

<ol>
<li>test</li>
<li>tester</li>
<li><p>testing</p></li>
<li><p>boxing</p></li>
<li>kick boxing</li>
<li>karate</li>
</ol>

【Result that I want is this.】

<ol>
<li>test</li>
<li>tester</li>
<li>testing</li>
</ol>

<ul>
<li>boxing</li>
<li>kick boxing</li>
<li>karate</li>
</ul>

I hope that it will be fixed. Thanks for reading so far.

mdiep commented 10 years ago

Thanks for the report! I'm still considering how to handle this. I understand why you expect there to be 2 lists, but most implementations will render this just like MMMarkdown.

lenlenlen commented 10 years ago

Happy new year! mdiep! Thank you for reply! I understand, I think MMMarkdown is very nice program. And I appreciate to you. But, When you will be fixed, I will more appreciate very much! Thanks for reading so far!

albertbori commented 9 years ago

I ran into this issue as well. Here in github, the following markdown:

- Cool
- Neat

1. Item 1
1. Item 2

Results in:

But when I run it through MMMarkdown, I get:

<ul>
<li>Cool</li>
<li><p>Neat</p>
</li>
<li><p>Item 1</p>
</li>
<li>Item 2</li>
</ul>

(Aside: Unfortunately, in both, I get that stray paragraph tag in some of the items, which cases extra spacing within list items.)

SerenadeX commented 8 years ago

Seeing this as well. It works if you start with unordered lists and follow with an ordered list and vice versa. Is progress being made on this?

mdiep commented 8 years ago

I haven't worked on this at all, but now that CommonMark is rendering this as two separate lists, I'll take a look at updating the behavior.