aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2010-03-13 03:19:19 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2010-03-13 03:19:19 +0000
commita35af5db295b0e0c598b1ff68f52fc14a4d3911e (patch)
tree9787c93bbb54f30de5cb8a436520acd4aa6aac1a /src
parent533dd14f985545601b33e50fac87f1e31016e292 (diff)
downloadpandoc-a35af5db295b0e0c598b1ff68f52fc14a4d3911e.tar.gz
OpenDocument writer: handle tables with no headers.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1882 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Writers/OpenDocument.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/OpenDocument.hs b/src/Text/Pandoc/Writers/OpenDocument.hs
index f057cf1cd..e3ed913d4 100644
--- a/src/Text/Pandoc/Writers/OpenDocument.hs
+++ b/src/Text/Pandoc/Writers/OpenDocument.hs
@@ -313,7 +313,9 @@ blockToOpenDocument o bs
captionDoc <- if null c
then return empty
else withParagraphStyle o "Caption" [Para c]
- th <- colHeadsToOpenDocument o name (map fst paraHStyles) h
+ th <- if all null h
+ then return empty
+ else colHeadsToOpenDocument o name (map fst paraHStyles) h
tr <- mapM (tableRowToOpenDocument o name (map fst paraStyles)) r
return $ inTags True "table:table" [ ("table:name" , name)
, ("table:style-name", name)