1
0
mirror of https://github.com/erusev/parsedown.git synced 2023-08-10 21:13:06 +03:00

Merge pull request #475 from aidantwoods/loose-lists

Loose lists
This commit is contained in:
Aidan Woods
2018-02-28 17:05:00 +00:00
committed by GitHub
6 changed files with 45 additions and 4 deletions

View File

@@ -569,6 +569,8 @@ class Parsedown
{
$Block['li']['text'] []= '';
$Block['loose'] = true;
unset($Block['interrupted']);
}
@@ -617,6 +619,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