Skip to content

Commit

Permalink
Update Splitter.php
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnathonKoster committed Nov 16, 2023
1 parent e5ebff0 commit 0df67e6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Document/Splitter.php
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,10 @@ protected function shouldIgnoreNode(DOMNode $node): bool

protected function shouldIsolateNode(DOMNode $node): bool
{
if (! method_exists($node, 'hasAttribute') || ! method_exists($node, 'getAttribute')) {
return false;
}

if ($node->hasAttribute('data-indexer') && $node->getAttribute('data-indexer') === 'nobreak') {
return true;
}
Expand Down

0 comments on commit 0df67e6

Please sign in to comment.