From 60004cd518f0fc72d45633dbb552f153bc3bfe96 Mon Sep 17 00:00:00 2001 From: Jesse Rosenthal Date: Tue, 13 Dec 2016 06:58:16 -0500 Subject: Docx reader: Empty header should be list of lists. In the past, the docx reader wrote an empty header as an empty list. It should have the same width as a row (and be filled with empty cells). (Note that I've reordered the code here slightly to get rid of a call to `head`. It wasn't unsafe because it tested for null, but it was a bit of a smell.) --- tests/docx/table_one_row.native | 4 +++- tests/docx/tables.native | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/docx/table_one_row.native b/tests/docx/table_one_row.native index bd1bf8145..1ea1b446c 100644 --- a/tests/docx/table_one_row.native +++ b/tests/docx/table_one_row.native @@ -1,5 +1,7 @@ [Table [] [AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0] - [] + [[] + ,[] + ,[]] [[[Plain [Str "One"]] ,[Plain [Str "Row"]] ,[Plain [Str "Table"]]]]] diff --git a/tests/docx/tables.native b/tests/docx/tables.native index cf23cf404..ae326950a 100644 --- a/tests/docx/tables.native +++ b/tests/docx/tables.native @@ -17,13 +17,15 @@ ,[Plain [Str "High"]] ,[Plain [Str "Tacky",Space,Str "uniform"]]]] ,Table [] [AlignDefault,AlignDefault] [0.0,0.0] - [] + [[] + ,[]] [[[Plain [Str "Sinple"]] ,[Plain [Str "Table"]]] ,[[Plain [Str "Without"]] ,[Plain [Str "Header"]]]] ,Table [] [AlignDefault,AlignDefault] [0.0,0.0] - [] + [[] + ,[]] [[[Para [Str "Simple"] ,Para [Str "Multiparagraph"]] ,[Para [Str "Table"] -- cgit v1.2.3