From 8f6495ce86720a50da4f7dc9c8ac11101225935b Mon Sep 17 00:00:00 2001 From: Emanuil Rusev Date: Sun, 26 Jan 2014 19:13:08 +0200 Subject: [PATCH] ternaries should not do more than assign a value --- Parsedown.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Parsedown.php b/Parsedown.php index 75c3d7c..b4a73b1 100755 --- a/Parsedown.php +++ b/Parsedown.php @@ -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;