diff --git a/Parsedown.php b/Parsedown.php index e7f4f9e..ab9e49e 100755 --- a/Parsedown.php +++ b/Parsedown.php @@ -158,12 +158,12 @@ class Parsedown } else { - unset($CurrentBlock['incomplete']); - if (method_exists($this, 'complete'.$CurrentBlock['type'])) { $CurrentBlock = $this->{'complete'.$CurrentBlock['type']}($CurrentBlock); } + + unset($CurrentBlock['incomplete']); } } @@ -236,6 +236,15 @@ class Parsedown } } + # ~ + + if (isset($CurrentBlock['incomplete']) and method_exists($this, 'complete'.$CurrentBlock['type'])) + { + $CurrentBlock = $this->{'complete'.$CurrentBlock['type']}($CurrentBlock); + } + + # ~ + $elements []= $CurrentBlock['element']; unset($elements[0]);