From 543a6c4175a1debd148e933fb271f5b8f088b199 Mon Sep 17 00:00:00 2001 From: Aidan Woods Date: Tue, 4 Oct 2016 18:59:36 +0100 Subject: [PATCH] Line handler may prevent specified element nesting Check if array is empty to shave some performance hits in the case than no non nestables are present. --- Parsedown.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Parsedown.php b/Parsedown.php index f1e09d9..fc2158f 100644 --- a/Parsedown.php +++ b/Parsedown.php @@ -1005,7 +1005,7 @@ class Parsedown { # check to see if the current inline type is nestable in the current context - if (in_array($inlineType, $non_nestables)) + if ( ! empty($non_nestables) and in_array($inlineType, $non_nestables)) { continue; }