diff options
-rw-r--r-- | src/Text/Pandoc/Writers/ConTeXt.hs | 2 | ||||
-rw-r--r-- | tests/writer.context | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/Text/Pandoc/Writers/ConTeXt.hs b/src/Text/Pandoc/Writers/ConTeXt.hs index 378c4ce96..763f77d7c 100644 --- a/src/Text/Pandoc/Writers/ConTeXt.hs +++ b/src/Text/Pandoc/Writers/ConTeXt.hs @@ -123,7 +123,7 @@ blockToConTeXt (BlockQuote lst) = do contents <- blockListToConTeXt lst return $ "\\startblockquote" $$ nest 0 contents $$ "\\stopblockquote" <> blankline blockToConTeXt (CodeBlock _ str) = - return $ "\\starttyping" <> cr <> flush (text str) <> cr <> "\\stoptyping" $$ blankline + return $ flush ("\\starttyping" <> cr <> text str <> cr <> "\\stoptyping") $$ blankline -- blankline because \stoptyping can't have anything after it, inc. '}' blockToConTeXt (RawBlock "context" str) = return $ text str <> blankline blockToConTeXt (RawBlock _ _ ) = return empty diff --git a/tests/writer.context b/tests/writer.context index f9fb03cef..9c3221c31 100644 --- a/tests/writer.context +++ b/tests/writer.context @@ -490,9 +490,9 @@ Multiple blocks with italics: \startdescr{{\em orange}} orange fruit - \starttyping +\starttyping { orange code block } - \stoptyping +\stoptyping \startblockquote orange block quote @@ -866,9 +866,9 @@ Here is a footnote reference,\footnote{Here is the footnote. It can go Subsequent blocks are indented to show that they belong to the footnote (as with list items). - \starttyping +\starttyping { <code> } - \stoptyping +\stoptyping If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.} This should {\em not} be a footnote |