Markdown writer: Don't wrap attributes in fenced code blocks.

This commit is contained in:
John MacFarlane 2013-06-11 10:17:12 -07:00
parent 50ba5a801a
commit a43e0ad5d6

View file

@ -316,10 +316,10 @@ blockToMarkdown opts (CodeBlock (_,classes,_) str)
blockToMarkdown opts (CodeBlock attribs str) = return $
case attribs of
x | x /= nullAttr && isEnabled Ext_fenced_code_blocks opts ->
tildes <> space <> attrs <> cr <> text str <>
tildes <> " " <> attrs <> cr <> text str <>
cr <> tildes <> blankline
(_,(cls:_),_) | isEnabled Ext_backtick_code_blocks opts ->
backticks <> space <> text cls <> cr <> text str <>
backticks <> " " <> text cls <> cr <> text str <>
cr <> backticks <> blankline
_ -> nest (writerTabStop opts) (text str) <> blankline
where tildes = text $ case [ln | ln <- lines str, all (=='~') ln] of