aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Writers/Texinfo.hs4
-rw-r--r--tests/tables.texinfo35
2 files changed, 38 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/Texinfo.hs b/src/Text/Pandoc/Writers/Texinfo.hs
index c6e1892c9..db32e5a62 100644
--- a/src/Text/Pandoc/Writers/Texinfo.hs
+++ b/src/Text/Pandoc/Writers/Texinfo.hs
@@ -191,7 +191,9 @@ blockToTexinfo (Header level lst) = do
seccmd _ = error "illegal seccmd level"
blockToTexinfo (Table caption aligns widths heads rows) = do
- headers <- tableHeadToTexinfo aligns heads
+ headers <- if all null heads
+ then return empty
+ else tableHeadToTexinfo aligns heads
captionText <- inlineListToTexinfo caption
rowsText <- mapM (tableRowToTexinfo aligns) rows
colDescriptors <-
diff --git a/tests/tables.texinfo b/tests/tables.texinfo
index 592e36855..f18de7012 100644
--- a/tests/tables.texinfo
+++ b/tests/tables.texinfo
@@ -122,3 +122,38 @@ Second
@tab Here's another one. Note the blank line between rows.
@end multitable
+Table without column headers:
+
+@multitable {123} {123} {123} {123}
+@item
+12
+ @tab 12
+ @tab 12
+ @tab 12
+@item
+123
+ @tab 123
+ @tab 123
+ @tab 123
+@item
+1
+ @tab 1
+ @tab 1
+ @tab 1
+@end multitable
+
+Multiline table without column headers:
+
+@multitable @columnfractions 0.15 0.14 0.16 0.34
+@item
+First
+ @tab row
+ @tab 12.0
+ @tab Example of a row that spans multiple lines.
+@item
+Second
+ @tab row
+ @tab 5.0
+ @tab Here's another one. Note the blank line between rows.
+@end multitable
+