aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2010-03-11 03:01:09 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2010-03-11 03:01:09 +0000
commitdf9d79cb81cd600f9b155d542c605abda4827310 (patch)
treec845fb66f1a8f1ab3d178dc75d4b1e01c33ac7ce /src/Text
parent3b9e7f36ebc04689739b939edb6b3e351a5d0ea7 (diff)
downloadpandoc-df9d79cb81cd600f9b155d542c605abda4827310.tar.gz
RTF writer: fixed headerless tables.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1877 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Writers/RTF.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/RTF.hs b/src/Text/Pandoc/Writers/RTF.hs
index 9f3b9de2a..b9ef2a29a 100644
--- a/src/Text/Pandoc/Writers/RTF.hs
+++ b/src/Text/Pandoc/Writers/RTF.hs
@@ -173,7 +173,9 @@ blockToRTF indent _ HorizontalRule =
blockToRTF indent alignment (Header level lst) = rtfPar indent 0 alignment $
"\\b \\fs" ++ (show (40 - (level * 4))) ++ " " ++ inlineListToRTF lst
blockToRTF indent alignment (Table caption aligns sizes headers rows) =
- tableRowToRTF True indent aligns sizes headers ++
+ (if all null headers
+ then ""
+ else tableRowToRTF True indent aligns sizes headers) ++
concatMap (tableRowToRTF False indent aligns sizes) rows ++
rtfPar indent 0 alignment (inlineListToRTF caption)