From 53d897788663ab1bb333ac854967b70acf2b20a4 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Sun, 7 Mar 2010 19:35:41 +0000 Subject: ConTeXt writer: Don't use header in headerless table. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1868 788f1e2b-df1e-0410-8736-df70ead52e1b --- src/Text/Pandoc/Writers/ConTeXt.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/Text/Pandoc/Writers') 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 -- cgit v1.2.3