From c7814f31e155da212bd3323294db08fe1f4d8ab9 Mon Sep 17 00:00:00 2001 From: despresc Date: Thu, 9 Apr 2020 20:08:49 -0400 Subject: Use the new builders, modify readers to preserve empty headers The Builder.simpleTable now only adds a row to the TableHead when the given header row is not null. This uncovered an inconsistency in the readers: some would unconditionally emit a header filled with empty cells, even if the header was not present. Now every reader has the conditional behaviour. Only the XWiki writer depended on the header row being always present; it now pads its head as necessary. --- test/tables.native | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'test/tables.native') diff --git a/test/tables.native b/test/tables.native index 4af38d174..dc74826e0 100644 --- a/test/tables.native +++ b/test/tables.native @@ -228,15 +228,7 @@ ,(AlignCenter,ColWidthDefault) ,(AlignRight,ColWidthDefault)] (TableHead ("",[],[]) - [Row ("",[],[]) - [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) - [] - ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) - [] - ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) - [] - ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) - []]]) + []) [(TableBody ("",[],[]) (RowHeadColumns 0) [] [Row ("",[],[]) @@ -276,15 +268,7 @@ ,(AlignRight,ColWidth 0.1625) ,(AlignDefault,ColWidth 0.35)] (TableHead ("",[],[]) - [Row ("",[],[]) - [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) - [] - ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) - [] - ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) - [] - ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) - []]]) + []) [(TableBody ("",[],[]) (RowHeadColumns 0) [] [Row ("",[],[]) -- cgit v1.2.3