php-markdown-extra-extended icon indicating copy to clipboard operation
php-markdown-extra-extended copied to clipboard

Consecutive lists causes weird formatting

Open egil opened this issue 14 years ago • 0 comments
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).

egil avatar Jul 09 '11 10:07 egil