Skip to content

Commit f90a949

Browse files
Wrap contents of table cell node in paragraph
1 parent 0a4188b commit f90a949

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

src/Nodes/TableCell.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,18 @@ public function renderHTML($node, $HTMLAttributes = [])
7272
0,
7373
];
7474
}
75+
76+
public static function wrapper($DOMNode)
77+
{
78+
if (
79+
$DOMNode->childNodes->length === 1
80+
&& $DOMNode->childNodes[0]->nodeName == "p"
81+
) {
82+
return null;
83+
}
84+
85+
return [
86+
'type' => 'paragraph',
87+
];
88+
}
7589
}

0 commit comments

Comments
 (0)