Give paragraph block semantics for overloading

This commit is contained in:
Aidan Woods 2018-04-09 15:12:17 +01:00
parent e4cd13350b
commit 043c55e4c6
No known key found for this signature in database
GPG Key ID: 9A6A8EFAA512BBB9
1 changed files with 20 additions and 6 deletions

View File

@ -283,12 +283,14 @@ class Parsedown
# ~ # ~
if ( if (isset($CurrentBlock) and $CurrentBlock['type'] === 'Paragraph')
isset($CurrentBlock) {
and $CurrentBlock['type'] === 'Paragraph' $Block = $this->paragraphContinue($Line, $CurrentBlock);
and ! isset($CurrentBlock['interrupted']) }
) {
$CurrentBlock['element']['handler']['argument'] .= "\n".$text; if (isset($Block))
{
$CurrentBlock = $Block;
} }
else else
{ {
@ -1065,6 +1067,18 @@ class Parsedown
); );
} }
protected function paragraphContinue($Line, array $Block)
{
if (isset($Block['interrupted']))
{
return;
}
$Block['element']['handler']['argument'] .= "\n".$Line['text'];
return $Block;
}
# #
# Inline Elements # Inline Elements
# #