php-markdown-extra-extended
php-markdown-extra-extended copied to clipboard
Consecutive lists causes weird formatting
trafficstars
More lists after each other causes problems, some of the items have their content wrapped in <p> tags.
Example input:
* Red
* Green
* Blue
+ Red
+ Green
+ Blue
- Red
- Green
- Blue
Resulting HTML:
<ul>
<li>Red</li>
<li>Green</li>
<li><p>Blue</p></li>
<li><p>Red</p></li>
<li>Green</li>
<li><p>Blue</p></li>
<li><p>Red</p></li>
<li>Green</li>
<li>Blue</li>
</ul>
Expected output:
<ul>
<li>Red</li>
<li>Green</li>
<li>Blue</li>
</ul>
<ul>
<li>Red</li>
<li>Green</li>
<li>Blue</li>
</ul>
<ul>
<li>Red</li>
<li>Green</li>
<li>Blue</li>
</ul>
Note: This issue also exists in the unmodified version of php-markdown (and GFM as well it seems).