mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
Count number of interrupts
This commit is contained in:
parent
9a021b2130
commit
3f5b0ee781
@ -182,7 +182,9 @@ class Parsedown
|
||||
{
|
||||
if (isset($CurrentBlock))
|
||||
{
|
||||
$CurrentBlock['interrupted'] = true;
|
||||
$CurrentBlock['interrupted'] = (isset($CurrentBlock['interrupted'])
|
||||
? $CurrentBlock['interrupted'] + 1 : 1
|
||||
);
|
||||
}
|
||||
|
||||
continue;
|
||||
@ -388,7 +390,7 @@ class Parsedown
|
||||
{
|
||||
if (isset($Block['interrupted']))
|
||||
{
|
||||
$Block['element']['element']['text'] .= "\n";
|
||||
$Block['element']['element']['text'] .= str_repeat("\n", $Block['interrupted']);
|
||||
|
||||
unset($Block['interrupted']);
|
||||
}
|
||||
@ -500,7 +502,7 @@ class Parsedown
|
||||
|
||||
if (isset($Block['interrupted']))
|
||||
{
|
||||
$Block['element']['element']['text'] .= "\n";
|
||||
$Block['element']['element']['text'] .= str_repeat("\n", $Block['interrupted']);
|
||||
|
||||
unset($Block['interrupted']);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user