diff options
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Writers/Markdown.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs index 84fc77a08..7e414d9f1 100644 --- a/src/Text/Pandoc/Writers/Markdown.hs +++ b/src/Text/Pandoc/Writers/Markdown.hs @@ -407,7 +407,13 @@ blockToMarkdown' opts (Div attrs ils) = do isEnabled Ext_markdown_in_html_blocks opts) -> tagWithAttrs "div" attrs <> blankline <> contents <> blankline <> "</div>" <> blankline + | isEnabled Ext_raw_html opts && + isEnabled Ext_markdown_attribute opts -> + tagWithAttrs "div" attrs' <> blankline <> + contents <> blankline <> "</div>" <> blankline | otherwise -> contents <> blankline + where (id',classes',kvs') = attrs + attrs' = (id',classes',("markdown","1"):kvs') blockToMarkdown' opts (Plain inlines) = do contents <- inlineListToMarkdown opts inlines -- escape if para starts with ordered list marker |