erusev / parsedown

Better Markdown Parser in PHP
https://parsedown.org
MIT License
14.69k stars 1.12k forks source link

bullet points rendered differently depending on if there's multiple bullet lists #762

Open skeets23 opened 4 years ago

skeets23 commented 4 years ago
- a
- b
    - c

renders as:

<ul>
<li>a</li>
<li>b
<ul>
<li>c</li>
</ul></li>
</ul>

... which is great. However:

- a
- b
    - c

- 1
- 2

renders as:

<ul>
<li>
<p>a</p>
</li>
<li>
<p>b</p>
<ul>
<li>c</li>
</ul>
</li>
<li>
<p>1</p>
</li>
<li>
<p>2</p>
</li>
</ul>
mabasic commented 4 years ago

I have just notices this recently, but if you go to the demo site: https://parsedown.org/demo

at create and render a list like so:

- something
- something

- something else

That you will get:

<ul>
    <li>something</li>
    <li><p>something</p></li>
    <li>something else</li>
</ul>