diff options
| author | Henri Menke <henri@icp.uni-stuttgart.de> | 2018-01-23 09:15:59 +1300 | 
|---|---|---|
| committer | Henri Menke <henri@icp.uni-stuttgart.de> | 2018-01-23 09:15:59 +1300 | 
| commit | 71bbadb7936e68673a46f7391caf446e35c81205 (patch) | |
| tree | 8f7d30a529b274e72e68b19f9bc1afd8a30bd153 | |
| parent | f8640fdff0ead507914c402109b02a778ca1c4c3 (diff) | |
| download | pandoc-71bbadb7936e68673a46f7391caf446e35c81205.tar.gz | |
ConTeXt writer: xtables: correct wrong usage of caption
| -rw-r--r-- | src/Text/Pandoc/Writers/ConTeXt.hs | 2 | ||||
| -rw-r--r-- | test/Tests/Writers/ConTeXt.hs | 2 | ||||
| -rw-r--r-- | test/tables.context | 6 | 
3 files changed, 5 insertions, 5 deletions
| diff --git a/src/Text/Pandoc/Writers/ConTeXt.hs b/src/Text/Pandoc/Writers/ConTeXt.hs index 64b7d2c53..bca00b55a 100644 --- a/src/Text/Pandoc/Writers/ConTeXt.hs +++ b/src/Text/Pandoc/Writers/ConTeXt.hs @@ -267,7 +267,7 @@ blockToConTeXt (Table caption aligns widths heads rows) = do      return $ "\\startplacetable" <> brackets (        if null caption          then "location=none" -        else "caption=" <> braces captionText +        else "title=" <> braces captionText        ) $$ body $$ "\\stopplacetable" <> blankline  tableToConTeXt :: PandocMonad m => Tabl -> Doc -> [Doc] -> WM m Doc diff --git a/test/Tests/Writers/ConTeXt.hs b/test/Tests/Writers/ConTeXt.hs index 5ce629674..678321519 100644 --- a/test/Tests/Writers/ConTeXt.hs +++ b/test/Tests/Writers/ConTeXt.hs @@ -92,7 +92,7 @@ tests = [ testGroup "inline code"                             plain $ text "3.3",                             plain $ text "3.4"]]                in table caption aligns headers rows -              =?> unlines [ "\\startplacetable[caption={Table 1}]" +              =?> unlines [ "\\startplacetable[title={Table 1}]"                            , "\\startTABLE"                            , "\\startTABLEhead"                            , "\\NC[align=left] Right" diff --git a/test/tables.context b/test/tables.context index 89ff4a025..11dffc065 100644 --- a/test/tables.context +++ b/test/tables.context @@ -1,6 +1,6 @@  Simple table with caption: -\startplacetable[caption={Demonstration of simple table syntax.}] +\startplacetable[title={Demonstration of simple table syntax.}]  \startxtable  \startxtablehead[head]  \startxrow @@ -74,7 +74,7 @@ Simple table without caption:  Simple table indented two spaces: -\startplacetable[caption={Demonstration of simple table syntax.}] +\startplacetable[title={Demonstration of simple table syntax.}]  \startxtable  \startxtablehead[head]  \startxrow @@ -111,7 +111,7 @@ Simple table indented two spaces:  Multiline table with caption: -\startplacetable[caption={Here's the caption. It may span multiple lines.}] +\startplacetable[title={Here's the caption. It may span multiple lines.}]  \startxtable  \startxtablehead[head]  \startxrow | 
