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:
parent
e4cd13350b
commit
043c55e4c6
@ -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
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user