mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
Only interrupt paragraph if starting with 1
This commit is contained in:
parent
a3e02c1d0e
commit
a9c21447ce
@ -523,7 +523,7 @@ class Parsedown
|
||||
#
|
||||
# List
|
||||
|
||||
protected function blockList($Line)
|
||||
protected function blockList($Line, array $CurrentBlock = null)
|
||||
{
|
||||
list($name, $pattern) = $Line['text'][0] <= '-' ? array('ul', '[*+-]') : array('ol', '[0-9]{1,9}[.\)]');
|
||||
|
||||
@ -562,6 +562,14 @@ class Parsedown
|
||||
|
||||
if ($listStart !== '1')
|
||||
{
|
||||
if (
|
||||
isset($CurrentBlock)
|
||||
and ! isset($CurrentBlock['type'])
|
||||
and ! isset($CurrentBlock['interrupted'])
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
$Block['element']['attributes'] = array('start' => $listStart);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user