parsedown
parsedown copied to clipboard
bullet points rendered differently depending on if there's multiple bullet lists
- 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>
- Suddenly, all list items are being wrapped in
<p>
tags. So depending on style sheets, the bullet list can look completely different after you add a second<ul>
, because for some reason, that adds<p>
tags to all<li>
tags. - These
<p>
tags, while causing unexpected behavior, could be acceptable if they were applied to allli
elements, because at least they would all look the same.... but indented<li>
elements do not change.... so by result, you end up with top levelli
elements withp
tags inside them, and second levelli
elements without thep
tag, giving a very inconsistent feel (notice the "c" is not wrapped in ap
tag, while all the rest of the text was).
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>