diff --git a/packages/core/lib/src/internal/ops/tag_table.dart b/packages/core/lib/src/internal/ops/tag_table.dart index 6b6c11697..d1179641d 100644 --- a/packages/core/lib/src/internal/ops/tag_table.dart +++ b/packages/core/lib/src/internal/ops/tag_table.dart @@ -274,18 +274,18 @@ class _TagTableRow { op = BuildOp(onChild: onChild); _cellOp = BuildOp( onWidgets: (cellMeta, widgets) { - final column = parent.wf.buildColumnPlaceholder(cellMeta, widgets); - if (column == null) return []; + final child = + parent.wf.buildColumnPlaceholder(cellMeta, widgets) ?? widget0; final attributes = cellMeta.element.attributes; row.cells.add(_TagTableDataCell( cellMeta, - child: column, + child: child, colspan: tryParseIntFromMap(attributes, kAttributeColspan) ?? 1, rowspan: tryParseIntFromMap(attributes, kAttributeRowspan) ?? 1, )); - return [column]; + return [child]; }, priority: BuildOp.kPriorityMax, ); diff --git a/packages/core/test/tag_table_test.dart b/packages/core/test/tag_table_test.dart index ee83f9ef2..7bd0f6191 100644 --- a/packages/core/test/tag_table_test.dart +++ b/packages/core/test/tag_table_test.dart @@ -725,10 +725,24 @@ void main() async { expect(explained, equals('[HtmlTable:children=${_richtext('Bar')}]')); }); - testWidgets('#80: empty TD', (WidgetTester tester) async { - final html = '
| Foo |