From 7ff0f97811d9293a9779460be8d01f4199fdb570 Mon Sep 17 00:00:00 2001 From: Emanuil Rusev Date: Fri, 16 Jan 2015 02:59:51 +0200 Subject: [PATCH] improve performance --- Parsedown.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Parsedown.php b/Parsedown.php index 8b6c423..c8b6a53 100755 --- a/Parsedown.php +++ b/Parsedown.php @@ -1233,7 +1233,7 @@ class Parsedown ); } - if (preg_match('/^<\w*(?:[ ]*'.$this->regexHtmlAttribute.')*[ ]*\/?>/s', $excerpt, $matches)) + if ($excerpt[1] !== ' ' and preg_match('/^<\w*(?:[ ]*'.$this->regexHtmlAttribute.')*[ ]*\/?>/s', $excerpt, $matches)) { return array( 'markup' => $matches[0],