From 7ab71ade06518afb3641d86dd40469c7d912010b Mon Sep 17 00:00:00 2001 From: Emanuil <4thmail@gmail.com> Date: Fri, 20 Sep 2013 02:12:06 +0300 Subject: [PATCH] optimize parsing of rule --- Parsedown.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Parsedown.php b/Parsedown.php index 134197b..68c7495 100755 --- a/Parsedown.php +++ b/Parsedown.php @@ -145,7 +145,7 @@ class Parsedown # Rule - if (isset($line) and preg_match('/^[ ]{0,3}([-*_])([ ]{0,2}\1){2,}[ ]*$/', $line)) + if (isset($line) and $line !== '' and preg_match('/^[ ]{0,3}([-*_])([ ]{0,2}\1){2,}[ ]*$/', $line)) { $rule = true;