Skip to content

Commit

Permalink
Wrap contents of table cell 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 7ee2a50 commit a5b1fd4
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Nodes/TableCell.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,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 a5b1fd4

Please sign in to comment.