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

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

View File

@ -283,12 +283,14 @@ class Parsedown
# ~
if (
isset($CurrentBlock)
and $CurrentBlock['type'] === 'Paragraph'
and ! isset($CurrentBlock['interrupted'])
) {
$CurrentBlock['element']['handler']['argument'] .= "\n".$text;
if (isset($CurrentBlock) and $CurrentBlock['type'] === 'Paragraph')
{
$Block = $this->paragraphContinue($Line, $CurrentBlock);
}
if (isset($Block))
{
$CurrentBlock = $Block;
}
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
#