summaryrefslogtreecommitdiff
path: root/src/Readability.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Readability.php')
-rw-r--r--src/Readability.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Readability.php b/src/Readability.php
index aadd631..2cad398 100644
--- a/src/Readability.php
+++ b/src/Readability.php
@@ -617,8 +617,6 @@ class Readability
*/
while ($node) {
- $matchString = $node->getAttribute('class') . ' ' . $node->getAttribute('id');
-
// Remove DOMComments nodes as we don't need them and mess up children counting
if ($node->nodeType === XML_COMMENT_NODE) {
$this->logger->debug(sprintf('[Get Nodes] Found comment node, removing... Node content was: \'%s\'', substr($node->nodeValue, 0, 128)));
@@ -626,6 +624,8 @@ class Readability
continue;
}
+ $matchString = $node->getAttribute('class') . ' ' . $node->getAttribute('id');
+
// Check to see if this node is a byline, and remove it if it is.
if ($this->checkByline($node, $matchString)) {
$this->logger->debug(sprintf('[Get Nodes] Found byline, removing... Node content was: \'%s\'', substr($node->nodeValue, 0, 128)));