1
0
mirror of https://github.com/erusev/parsedown.git synced 2023-08-10 21:13:06 +03:00

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

View File

@ -1005,7 +1005,7 @@ class Parsedown
{ {
# check to see if the current inline type is nestable in the current context # 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; continue;
} }