summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndres Rey <[email protected]>2016-11-21 16:38:56 +0000
committerAndres Rey <[email protected]>2016-11-21 16:38:56 +0000
commit32a306f3dd80a2a978343462d6554f5e7acf9f36 (patch)
tree9fb7415302d0126dafe474e53df2c55d4c42372a /src
parent6d979653a8c26107acda0cac376c693bb5a1a07a (diff)
Replaced comment
Diffstat (limited to 'src')
-rw-r--r--src/HTMLParser.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/HTMLParser.php b/src/HTMLParser.php
index edbb8c6..abf0725 100644
--- a/src/HTMLParser.php
+++ b/src/HTMLParser.php
@@ -549,11 +549,13 @@ class HTMLParser
$import = $articleContent->importNode($sibling->getDOMNode(), true);
$articleContent->appendChild($import);
- // TODO Check node shifting!
- // siblings is a reference to the children array, and
- // sibling is removed from the array when we call appendChild().
- // As a result, we must revisit this index since the nodes
- // have been shifted.
+ /*
+ * No node shifting needs to be check because when calling getChildren, an array is made with the
+ * children of the parent node, instead of using the DOMElement childNodes function, which, when used
+ * along with appendChild, would shift the nodes position and the current foreach will behave in
+ * unpredictable ways.
+ */
+
}
}