Skip to content

Commit

Permalink
Wrap contents of table header node in paragraph
Browse files Browse the repository at this point in the history
  • Loading branch information
godismyjudge95 authored and nperez0111 committed Aug 12, 2024
1 parent 303877d commit 7ee2a50
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Nodes/TableHeader.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,18 @@ public function renderHTML($node, $HTMLAttributes = [])
0,
];
}

public static function wrapper($DOMNode)
{
if (
$DOMNode->childNodes->length === 1
&& $DOMNode->childNodes[0]->nodeName == "p"
) {
return null;
}

return [
'type' => 'paragraph',
];
}
}

0 comments on commit 7ee2a50

Please sign in to comment.