aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2010-03-07 19:35:41 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2010-03-07 19:35:41 +0000
commit53d897788663ab1bb333ac854967b70acf2b20a4 (patch)
treeb0baa79d362b7f1b12e4c094ba5bd8aa854b2439 /src/Text
parentc5e718ce9e45d152c11fecd17c239dab8ab71f64 (diff)
downloadpandoc-53d897788663ab1bb333ac854967b70acf2b20a4.tar.gz
ConTeXt writer: Don't use header in headerless table.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1868 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Writers/ConTeXt.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/ConTeXt.hs b/src/Text/Pandoc/Writers/ConTeXt.hs
index 0001cbe0b..cf8c3cc91 100644
--- a/src/Text/Pandoc/Writers/ConTeXt.hs
+++ b/src/Text/Pandoc/Writers/ConTeXt.hs
@@ -185,13 +185,15 @@ blockToConTeXt (Table caption aligns widths heads rows) = do
else ("p(" ++ printf "%.2f" colWidth ++ "\\textwidth)|")
let colDescriptors = "|" ++ (concat $
zipWith colDescriptor widths aligns)
- headers <- tableRowToConTeXt heads
+ headers <- if all null heads
+ then return empty
+ else liftM ($$ text "\\HL") $ tableRowToConTeXt heads
captionText <- inlineListToConTeXt caption
let captionText' = if null caption then text "none" else captionText
rows' <- mapM tableRowToConTeXt rows
return $ Pad $ text "\\placetable[here]{" <> captionText' <> char '}' $$
text "\\starttable[" <> text colDescriptors <> char ']' $$
- text "\\HL" $$ headers $$ text "\\HL" $$
+ text "\\HL" $$ headers $$
vcat rows' $$ text "\\HL\n\\stoptable"
tableRowToConTeXt :: [[Block]] -> State WriterState Doc