mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
remove ability for htmlblock to allow paragraph after if it closes on the same line
This commit is contained in:
parent
1d0af35f10
commit
6a4afac0d0
@ -697,32 +697,6 @@ class Parsedown
|
|||||||
'markup' => $Line['text'],
|
'markup' => $Line['text'],
|
||||||
);
|
);
|
||||||
|
|
||||||
$length = strlen($matches[0]);
|
|
||||||
|
|
||||||
$remainder = substr($Line['text'], $length);
|
|
||||||
|
|
||||||
if (trim($remainder) === '')
|
|
||||||
{
|
|
||||||
if (isset($matches[2]) or in_array($matches[1], $this->voidElements))
|
|
||||||
{
|
|
||||||
$Block['closed'] = true;
|
|
||||||
|
|
||||||
$Block['void'] = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (isset($matches[2]) or in_array($matches[1], $this->voidElements))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (preg_match('/<\/'.$matches[1].'>[ ]*$/i', $remainder))
|
|
||||||
{
|
|
||||||
$Block['closed'] = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $Block;
|
return $Block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user