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.
This commit is contained in:
Aidan Woods 2016-10-04 18:59:36 +01:00 committed by GitHub
parent a81aedeb10
commit 543a6c4175
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}