diff options
author | Andres Rey <[email protected]> | 2018-09-01 18:43:35 +0100 |
---|---|---|
committer | Andres Rey <[email protected]> | 2018-09-01 18:43:35 +0100 |
commit | e1247d6d044d02605a3b306187f44fe9795db908 (patch) | |
tree | d224258ccdc558def4b16b9652a8a7f34ffb4f15 /src/Nodes | |
parent | 16af86a95a44407f18e0de8677487b1b71c10446 (diff) |
Update logic when accessing next element
Diffstat (limited to 'src/Nodes')
-rw-r--r-- | src/Nodes/NodeUtility.php | 4 |
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; } |