diff options
author | Andres Rey <[email protected]> | 2016-12-10 12:08:52 +0000 |
---|---|---|
committer | Andres Rey <[email protected]> | 2016-12-10 12:08:52 +0000 |
commit | 3757f8f838687374e0cb6255928dee83492678f7 (patch) | |
tree | d9a59baac6ad4862bcb7f0f9b92653b33a35e7d6 /src/Readability.php | |
parent | 1e0cc1cda41d1e9bd223dfba616c4b1351b6934e (diff) |
Solved some mistakes during node parsing (before scoring)
Diffstat (limited to 'src/Readability.php')
-rw-r--r-- | src/Readability.php | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/Readability.php b/src/Readability.php index d647e63..e3122dd 100644 --- a/src/Readability.php +++ b/src/Readability.php @@ -417,11 +417,9 @@ class Readability extends Element implements ReadabilityInterface public function createNode(Readability $originalNode, $tagName) { $text = $originalNode->getTextContent(); - $newnode = $originalNode->node->ownerDocument->createElement($tagName, $text); + $newNode = $originalNode->node->ownerDocument->createElement($tagName, $text); - $return = $originalNode->node->appendChild($newnode); - - return new static($return); + return new static($newNode); } /** |