Skip to content

Commit

Permalink
Line handler may prevent specified element nesting
Browse files Browse the repository at this point in the history
Check if array is empty to shave some performance hits in the case than no non nestables are present.
  • Loading branch information
aidantwoods committed Oct 4, 2016
1 parent a81aede commit 543a6c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Parsedown.php
Original file line number Diff line number Diff line change
Expand Up @@ -1005,7 +1005,7 @@ public function line($text, $non_nestables=array())
{
# 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;
}
Expand Down

0 comments on commit 543a6c4

Please sign in to comment.