diff options
author | Andres Rey <[email protected]> | 2017-11-09 18:37:40 +0000 |
---|---|---|
committer | Andres Rey <[email protected]> | 2017-11-09 18:37:40 +0000 |
commit | 6437e87b77eec9870ac042298731c8cf34fc8b74 (patch) | |
tree | bc5ecdd36b4b193fbcd82cd3a4a88532c5a82d20 /src/Readability.php | |
parent | 0eb5fe0c29ac48f1beee2bdc0c9984e9d7ea85f9 (diff) |
Better detection of empty paragraphs
Diffstat (limited to 'src/Readability.php')
-rw-r--r-- | src/Readability.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Readability.php b/src/Readability.php index b0a5830..922e60f 100644 --- a/src/Readability.php +++ b/src/Readability.php @@ -78,6 +78,18 @@ class Readability extends Element implements ReadabilityInterface } /** + * Checks for the node type. + * + * @param string $value Type of node to compare to + * + * @return bool + */ + public function nodeTypeEqualsTo($value) + { + return $this->node->nodeType === $value; + } + + /** * Get the ancestors of the current node. * * @param int $maxLevel Max amount of ancestors to get. |