aboutsummaryrefslogtreecommitdiff
path: root/test/docx
diff options
context:
space:
mode:
authordespresc <christian.j.j.despres@gmail.com>2020-04-09 20:08:49 -0400
committerdespresc <christian.j.j.despres@gmail.com>2020-04-15 23:03:22 -0400
commitc7814f31e155da212bd3323294db08fe1f4d8ab9 (patch)
tree9b933ba5d6071bf7e8ca6a17af71cc2780174e7f /test/docx
parentd368536a4ebfc542a58bd9bec6718590711c6efb (diff)
downloadpandoc-c7814f31e155da212bd3323294db08fe1f4d8ab9.tar.gz
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.
Diffstat (limited to 'test/docx')
-rw-r--r--test/docx/0_level_headers.native4
-rw-r--r--test/docx/sdt_elements.native8
-rw-r--r--test/docx/table_one_row.native8
-rw-r--r--test/docx/tables.native12
4 files changed, 5 insertions, 27 deletions
diff --git a/test/docx/0_level_headers.native b/test/docx/0_level_headers.native
index 773d9acdf..7f875891e 100644
--- a/test/docx/0_level_headers.native
+++ b/test/docx/0_level_headers.native
@@ -2,9 +2,7 @@
[])
[(AlignDefault,ColWidthDefault)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])
diff --git a/test/docx/sdt_elements.native b/test/docx/sdt_elements.native
index 7c2248d39..dca82f0a0 100644
--- a/test/docx/sdt_elements.native
+++ b/test/docx/sdt_elements.native
@@ -4,13 +4,7 @@
,(AlignDefault,ColWidthDefault)
,(AlignDefault,ColWidthDefault)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])
diff --git a/test/docx/table_one_row.native b/test/docx/table_one_row.native
index 484efc5f5..e9188b145 100644
--- a/test/docx/table_one_row.native
+++ b/test/docx/table_one_row.native
@@ -4,13 +4,7 @@
,(AlignDefault,ColWidthDefault)
,(AlignDefault,ColWidthDefault)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])
diff --git a/test/docx/tables.native b/test/docx/tables.native
index 89efc7309..e541e5a6e 100644
--- a/test/docx/tables.native
+++ b/test/docx/tables.native
@@ -51,11 +51,7 @@
[(AlignDefault,ColWidthDefault)
,(AlignDefault,ColWidthDefault)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])
@@ -75,11 +71,7 @@
[(AlignDefault,ColWidthDefault)
,(AlignDefault,ColWidthDefault)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])