Skip to content

Commit e5f667d

Browse files
committed
Block style elements in table cells (td/th) should not produce block-like bottom spacing
1 parent 6de34b9 commit e5f667d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/html_parser.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,8 @@ class HtmlParser extends StatelessWidget {
550550
.expand((tree) => [
551551
parseTree(newContext, tree),
552552
if (tree.style.display == Display.BLOCK &&
553+
tree.element?.parent?.localName != "th" &&
554+
tree.element?.parent?.localName != "td" &&
553555
tree.element?.localName != "html" &&
554556
tree.element?.localName != "body")
555557
TextSpan(text: "\n"),

0 commit comments

Comments
 (0)