diff options
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r-- | src/Text/Pandoc/Writers/Markdown.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs index 425a63c90..fc676a9bf 100644 --- a/src/Text/Pandoc/Writers/Markdown.hs +++ b/src/Text/Pandoc/Writers/Markdown.hs @@ -297,8 +297,10 @@ blockToMarkdown opts (CodeBlock attribs str) = return $ (tildes <> space <> attrs <> cr <> text str <> cr <> tildes) <> blankline else nest (writerTabStop opts) (text str) <> blankline - where tildes = text "~~~~" - attrs = attrsToMarkdown attribs + where tildes = text "~~~~" + attrs = if isEnabled Ext_fenced_code_attributes opts + then attrsToMarkdown attribs + else empty blockToMarkdown opts (BlockQuote blocks) = do st <- get -- if we're writing literate haskell, put a space before the bird tracks |