mirror of
https://github.com/erusev/parsedown.git
synced 2025-09-03 03:42:38 +02:00
Prevent breaking remaining previously compliant CommonMarkWeak tests
This commit is contained in:
@@ -165,7 +165,7 @@ class Parsedown
|
||||
|
||||
if (isset($CurrentBlock['continuable']))
|
||||
{
|
||||
$Block = $this->{'block'.$CurrentBlock['type'].'Continue'}($Line, $CurrentBlock);
|
||||
$Block = $this->{'block'.$CurrentBlock['type'].'Continue'}($Line, $CurrentBlock, $parentType);
|
||||
|
||||
if (isset($Block))
|
||||
{
|
||||
@@ -449,7 +449,7 @@ class Parsedown
|
||||
}
|
||||
}
|
||||
|
||||
protected function blockFencedCodeContinue($Line, $Block)
|
||||
protected function blockFencedCodeContinue($Line, $Block, $parentType)
|
||||
{
|
||||
if (isset($Block['complete']))
|
||||
{
|
||||
@@ -472,6 +472,11 @@ class Parsedown
|
||||
return $Block;
|
||||
}
|
||||
|
||||
if ($parentType === 'List')
|
||||
{
|
||||
$Line['body'] = preg_replace('/^[ ]{0,'.min(4, $Line['indent']).'}/', '', $Line['body']);
|
||||
}
|
||||
|
||||
$Block['element']['text']['text'] .= "\n".$Line['body'];;
|
||||
|
||||
return $Block;
|
||||
|
Reference in New Issue
Block a user