aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2012-04-11 09:02:32 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2012-04-11 09:02:32 -0700
commitdbbc932f24ae3d180062c4db9b24fff12e4ae3c9 (patch)
tree78ed1ce3b1f52c8954040cab20078d7313066bcd /src/Text/Pandoc/Writers
parenta388024a576d969be11efd13401d95a1a5f55577 (diff)
downloadpandoc-dbbc932f24ae3d180062c4db9b24fff12e4ae3c9.tar.gz
Markdown writer: don't force delimited code blocks to be flush left.
Fixes bug with delimited code blocks inside lists etc.
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r--src/Text/Pandoc/Writers/Markdown.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs
index 9a51dfdcb..59cb31e66 100644
--- a/src/Text/Pandoc/Writers/Markdown.hs
+++ b/src/Text/Pandoc/Writers/Markdown.hs
@@ -254,7 +254,7 @@ blockToMarkdown opts (CodeBlock attribs str) = return $
if writerStrictMarkdown opts || attribs == nullAttr
then nest (writerTabStop opts) (text str) <> blankline
else -- use delimited code block
- flush (tildes <> space <> attrs <> cr <> text str <>
+ (tildes <> space <> attrs <> cr <> text str <>
cr <> tildes) <> blankline
where tildes = text "~~~~"
attrs = attrsToMarkdown attribs