summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndres Rey <[email protected]>2017-11-28 21:01:34 +0000
committerAndres Rey <[email protected]>2017-11-28 21:01:34 +0000
commit1c3309958978283a7868e81d99cc7381ac30ed94 (patch)
treef5e7d82e7fa73f6b6d8aef61711cc756d478e73f /src
parent883c9029aba45ef2351296490d4cc91725f6c2ba (diff)
But don't forget to replace the current node
Diffstat (limited to 'src')
-rw-r--r--src/Readability.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Readability.php b/src/Readability.php
index 4e0d4a1..aca5e21 100644
--- a/src/Readability.php
+++ b/src/Readability.php
@@ -477,7 +477,8 @@ class Readability
$node = $pNode;
$elementsToScore[] = $node;
} elseif (!NodeUtility::hasSingleChildBlockElement($node)) {
- $elementsToScore[] = NodeUtility::setNodeTag($node, 'p');
+ $node = NodeUtility::setNodeTag($node, 'p');
+ $elementsToScore[] = $node;
} else {
// EXPERIMENTAL
foreach ($node->getChildren() as $child) {