spoiler-auto-cw #1

Closed
keith wants to merge 5 commits from spoiler-auto-cw into megamerge
1 changed files with 1 additions and 1 deletions
Showing only changes of commit 721a2ca361 - Show all commits

View File

@ -114,7 +114,7 @@ class HTML
/** @var \DOMNode $child */
foreach ($node->childNodes as $key => $child) {
/* Remove empty text nodes at the start or at the end of the children list */
if ($key > 0 && $key < $node->childNodes->length - 1 || $child->nodeName != '#text' || !empty(trim($child->nodeValue))) {
if ($key > 0 && $key < $node->childNodes->length - 1 || $child->nodeName != '#text' || trim($child->nodeValue) !== '') {
$newNode = $child->cloneNode(true);
$node->parentNode->insertBefore($newNode, $node);
}