summaryrefslogtreecommitdiff
path: root/src/Nodes
diff options
context:
space:
mode:
authorAndres Rey <[email protected]>2018-09-01 18:43:35 +0100
committerAndres Rey <[email protected]>2018-09-01 18:43:35 +0100
commite1247d6d044d02605a3b306187f44fe9795db908 (patch)
treed224258ccdc558def4b16b9652a8a7f34ffb4f15 /src/Nodes
parent16af86a95a44407f18e0de8677487b1b71c10446 (diff)
Update logic when accessing next element
Diffstat (limited to 'src/Nodes')
-rw-r--r--src/Nodes/NodeUtility.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Nodes/NodeUtility.php b/src/Nodes/NodeUtility.php
index bb63828..b5f66ba 100644
--- a/src/Nodes/NodeUtility.php
+++ b/src/Nodes/NodeUtility.php
@@ -45,8 +45,8 @@ class NodeUtility
{
$next = $node;
while ($next
- && $next->nodeName !== '#text'
- && trim($next->textContent)) {
+ && $next->nodeType !== XML_ELEMENT_NODE
+ && preg_match(NodeUtility::$regexps['whitespace'], $next->textContent)) {
$next = $next->nextSibling;
}