diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Readability.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Readability.php b/src/Readability.php index 5e0d4b4..b0a5830 100644 --- a/src/Readability.php +++ b/src/Readability.php @@ -472,7 +472,7 @@ class Readability extends Element implements ReadabilityInterface { $depth = 0; while ($node->getParent()) { - if ($depth > $maxDepth) { + if ($maxDepth > 0 && $depth > $maxDepth) { return false; } if ($node->getParent()->tagNameEqualsTo($tagName)) { |