git.iko.soy/typeable/pandoc
on master help sign in
ConTeXt writer: Don't use header in headerless table.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1868 788f1e2b-df1e-0410-8736-df70ead52e1b

commit53d897788663ab1bb333ac854967b70acf2b20a4 authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateSun 7 Mar 2010, 19:35 (17 years ago) parentc5e718c
1 file changed+4−2
src/Text/Pandoc/Writers/ConTeXt.hs+4−2
src/Text/Pandoc/Writers/ConTeXt.hs+4−2
@@ -185,13 +185,15 @@ blockToConTeXt (Table caption aligns widths heads rows) = do
185185 else ("p(" ++ printf "%.2f" colWidth ++ "\\textwidth)|")
186186 let colDescriptors = "|" ++ (concat $
187187 zipWith colDescriptor widths aligns)
188− headers <- tableRowToConTeXt heads
188+ headers <- if all null heads
189+ then return empty
190+ else liftM ($$ text "\\HL") $ tableRowToConTeXt heads
189191 captionText <- inlineListToConTeXt caption
190192 let captionText' = if null caption then text "none" else captionText
191193 rows' <- mapM tableRowToConTeXt rows
192194 return $ Pad $ text "\\placetable[here]{" <> captionText' <> char '}' $$
193195 text "\\starttable[" <> text colDescriptors <> char ']' $$
194− text "\\HL" $$ headers $$ text "\\HL" $$
196+ text "\\HL" $$ headers $$
195197 vcat rows' $$ text "\\HL\n\\stoptable"
196198
197199tableRowToConTeXt :: [[Block]] -> State WriterState Doc