summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Writers/Docbook.hs1
-rw-r--r--tests/tables.docbook47
2 files changed, 48 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Writers/Docbook.hs b/src/Text/Pandoc/Writers/Docbook.hs
index 294c043e2..996e50e6b 100644
--- a/src/Text/Pandoc/Writers/Docbook.hs
+++ b/src/Text/Pandoc/Writers/Docbook.hs
@@ -181,6 +181,7 @@ colHeadsToDocbook :: WriterOptions
-> [Double]
-> [[Block]]
-> Doc
+colHeadsToDocbook _ _ _ hs | all null hs = empty
colHeadsToDocbook opts alignStrings widths headers =
let heads = zipWith3 (\align width item ->
tableItemToDocbook opts "th" align width item)
diff --git a/tests/tables.docbook b/tests/tables.docbook
index 002aacd66..6622fb2b2 100644
--- a/tests/tables.docbook
+++ b/tests/tables.docbook
@@ -284,3 +284,50 @@
</td>
</tr>
</informaltable>
+<para>
+ Table without column headers:
+</para>
+<informaltable>
+ <tr>
+ <td align="right">
+ 12
+ </td>
+ <td align="left">
+ 12
+ </td>
+ <td align="center">
+ 12
+ </td>
+ <td align="right">
+ 12
+ </td>
+ </tr>
+ <tr>
+ <td align="right">
+ 123
+ </td>
+ <td align="left">
+ 123
+ </td>
+ <td align="center">
+ 123
+ </td>
+ <td align="right">
+ 123
+ </td>
+ </tr>
+ <tr>
+ <td align="right">
+ 1
+ </td>
+ <td align="left">
+ 1
+ </td>
+ <td align="center">
+ 1
+ </td>
+ <td align="right">
+ 1
+ </td>
+ </tr>
+</informaltable>