From 96bf75bd91b0cd63d245950cc66f66b19bb3dc6d Mon Sep 17 00:00:00 2001 From: Emanuil Rusev Date: Mon, 18 Nov 2013 21:42:00 +0200 Subject: [PATCH] remove goto to provide support for PHP 5.2 --- Parsedown.php | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/Parsedown.php b/Parsedown.php index 97bab43..45144bf 100755 --- a/Parsedown.php +++ b/Parsedown.php @@ -238,20 +238,11 @@ class Parsedown break; } - # ~ - - if ($line[0] >= 'a' and $line[0] !== '~' or $line[0] >= 'A' and $line[0] <= 'Z') - { - goto paragraph; - } - - # ~ - - $deindented_line = $line; - # # indentation sensitive types + $deindented_line = $line; + switch ($line[0]) { case ' ': @@ -500,9 +491,7 @@ class Parsedown continue; } - # ~ - - paragraph: + # paragraph if ($element['type'] === 'p') {