mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
dense list items that follow sparse ones should not be rendered as sparse ones
This commit is contained in:
parent
e9098aebfa
commit
a7510b97e7
@ -200,13 +200,14 @@ class Parsedown
|
||||
|
||||
$blocks []= $block;
|
||||
|
||||
unset($block['first']);
|
||||
|
||||
$block['last'] = true;
|
||||
$block['lines'] = array();
|
||||
|
||||
$block['lines'] []= preg_replace('/^[ ]{0,4}/', '', $matches[1]);
|
||||
|
||||
unset($block['first']);
|
||||
unset($block['interrupted']);
|
||||
|
||||
continue 2;
|
||||
}
|
||||
|
||||
|
7
tests/data/sparse_dense_list.html
Normal file
7
tests/data/sparse_dense_list.html
Normal file
@ -0,0 +1,7 @@
|
||||
<ul>
|
||||
<li>
|
||||
<p>li</p>
|
||||
</li>
|
||||
<li>li</li>
|
||||
<li>li</li>
|
||||
</ul>
|
4
tests/data/sparse_dense_list.md
Normal file
4
tests/data/sparse_dense_list.md
Normal file
@ -0,0 +1,4 @@
|
||||
- li
|
||||
|
||||
- li
|
||||
- li
|
Loading…
Reference in New Issue
Block a user