From 0820d0a6070fb629cf518cb1d28ac35ef898686a Mon Sep 17 00:00:00 2001 From: Emanuil Rusev Date: Mon, 12 May 2014 00:34:47 +0300 Subject: [PATCH] paragraph doesn't have to use a type --- Parsedown.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Parsedown.php b/Parsedown.php index dceb869..c422078 100755 --- a/Parsedown.php +++ b/Parsedown.php @@ -226,7 +226,7 @@ class Parsedown # ~ - if ($CurrentBlock['type'] === 'Paragraph' and ! isset($CurrentBlock['interrupted'])) + if (isset($CurrentBlock) and ! isset($CurrentBlock['type']) and ! isset($CurrentBlock['interrupted'])) { $CurrentBlock['element']['text'] .= "\n".$text; } @@ -236,10 +236,7 @@ class Parsedown $CurrentBlock = $this->buildParagraph($Line); - $CurrentBlock += array( - 'type' => 'Paragraph', - 'identified' => true, - ); + $CurrentBlock['identified'] = true; } } @@ -568,7 +565,7 @@ class Parsedown protected function identifySetext($Line, array $Block = null) { - if ( ! isset($Block) or $Block['type'] !== 'Paragraph' or isset($Block['interrupted'])) + if ( ! isset($Block) or isset($Block['type']) or isset($Block['interrupted'])) { return; } @@ -646,7 +643,7 @@ class Parsedown protected function identifyTable($Line, array $Block = null) { - if ( ! isset($Block) or $Block['type'] !== 'Paragraph' or isset($Block['interrupted'])) + if ( ! isset($Block) or isset($Block['type']) or isset($Block['interrupted'])) { return; }