consistent li items for loose list

This commit is contained in:
Aidan Woods 2017-02-19 16:12:04 +00:00
parent 1196ed9512
commit 0e1043a8d6
No known key found for this signature in database
GPG Key ID: 9A6A8EFAA512BBB9

View File

@ -547,6 +547,8 @@ class Parsedown
{
$Block['li']['text'] []= '';
$Block['loose'] = true;
unset($Block['interrupted']);
}
@ -595,6 +597,22 @@ class Parsedown
}
}
protected function blockListComplete(array $Block)
{
if (isset($Block['loose']))
{
foreach ($Block['element']['text'] as &$li)
{
if (end($li['text']) !== '')
{
$li['text'] []= '';
}
}
}
return $Block;
}
#
# Quote