mirror of
https://github.com/erusev/parsedown.git
synced 2025-09-03 03:42:38 +02:00
Give paragraph block semantics for overloading
This commit is contained in:
@@ -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
|
||||||
#
|
#
|
||||||
|
Reference in New Issue
Block a user