mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
consistent li items for loose list
This commit is contained in:
parent
1196ed9512
commit
0e1043a8d6
@ -547,6 +547,8 @@ class Parsedown
|
|||||||
{
|
{
|
||||||
$Block['li']['text'] []= '';
|
$Block['li']['text'] []= '';
|
||||||
|
|
||||||
|
$Block['loose'] = true;
|
||||||
|
|
||||||
unset($Block['interrupted']);
|
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
|
# Quote
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user