Markdown writer: don't force delimited code blocks to be flush left.

Fixes bug with delimited code blocks inside lists etc.
This commit is contained in:
John MacFarlane 2012-04-11 09:02:32 -07:00
parent a388024a57
commit dbbc932f24

View file

@ -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