aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2013-06-28 21:30:27 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2013-06-28 21:30:27 -0700
commit5cb0f0bbf1da61b7ce276a39055a51b6166500cc (patch)
tree0ad247f45a92655aee4363d0e5906444b0e0b938 /src/Text
parent644e3239a9d1fc92f7409db8612ced39e38fde2f (diff)
downloadpandoc-5cb0f0bbf1da61b7ce276a39055a51b6166500cc.tar.gz
ConTeXt writer: Properly handle tables without captions.
The old output only worked in MkII. This should work in MkIV as well. Closes #837.
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 85cb8e3d1..ac158b471 100644
--- a/src/Text/Pandoc/Writers/ConTeXt.hs
+++ b/src/Text/Pandoc/Writers/ConTeXt.hs
@@ -203,9 +203,11 @@ blockToConTeXt (Table caption aligns widths heads rows) = do
then return empty
else liftM ($$ "\\HL") $ tableRowToConTeXt heads
captionText <- inlineListToConTeXt caption
- let captionText' = if null caption then text "none" else captionText
rows' <- mapM tableRowToConTeXt rows
- return $ "\\placetable[here]" <> braces captionText' $$
+ return $ "\\placetable" <> brackets ("here" <> if null caption
+ then ",none"
+ else "")
+ <> braces captionText $$
"\\starttable" <> brackets (text colDescriptors) $$
"\\HL" $$ headers $$
vcat rows' $$ "\\HL" $$ "\\stoptable" <> blankline