Skip to content

Commit be18d51

Browse files
committed
Add check for isTextNode
1 parent dd960c9 commit be18d51

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Compiler.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ private function isRemovedFromTheDom(DOMNode $node)
4545
{
4646
return $node->parentNode === null;
4747
}
48+
49+
private function isTextNode(DOMNode $node): bool
50+
{
51+
return $node instanceof DOMCharacterData;
52+
}
53+
4854
/**
4955
* @throws Exception
5056
*/

0 commit comments

Comments
 (0)