ternaries should not do more than assign a value

This commit is contained in:
Emanuil Rusev 2014-01-26 19:13:08 +02:00
parent 250ba80356
commit 8f6495ce86
1 changed files with 8 additions and 3 deletions

View File

@ -141,9 +141,14 @@ class Parsedown
if (strpos($line, $block['end']) !== false) # closing tag
{
$block['depth'] > 0
? $block['depth']--
: $block['closed'] = true;
if ($block['depth'] > 0)
{
$block['depth']--;
}
else
{
$block['closed'] = true;
}
}
$block['text'] .= "\n".$line;