diff options
Diffstat (limited to 'src/Nodes/NodeUtility.php')
-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; } |