now checking if skipped empty node is actually a text node

feature/tests
Michael Ochmann 3 years ago
parent cbba8bf4dd
commit fc2c074e5b
  1. 2
      src/Parser.php

@ -307,7 +307,7 @@ class Parser {
$elm = $this->document->createElement("p");
$i = 0;
foreach ($elms as $node) {
if (trim($node->textContent) === "")
if ($node->nodeName === "#text" && trim($node->textContent) === "")
continue;
$elm->appendChild($node);
$i++;

Loading…
Cancel
Save