diff options
| -rw-r--r-- | src/Text/Pandoc/Writers/Markdown.hs | 9 | 
1 files changed, 6 insertions, 3 deletions
| diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs index 523dfeaed..9d6064af6 100644 --- a/src/Text/Pandoc/Writers/Markdown.hs +++ b/src/Text/Pandoc/Writers/Markdown.hs @@ -787,6 +787,7 @@ blockListToMarkdown :: PandocMonad m                      -> MD m Doc  blockListToMarkdown opts blocks = do    inlist <- asks envInList +  isPlain <- asks envPlain    -- a) insert comment between list and indented code block, or the    -- code block will be treated as a list continuation paragraph    -- b) change Plain to Para unless it's followed by a RawBlock @@ -813,9 +814,11 @@ blockListToMarkdown opts blocks = do        isListBlock (OrderedList _ _)  = True        isListBlock (DefinitionList _) = True        isListBlock _                  = False -      commentSep                     = if isEnabled Ext_raw_html opts -                                          then RawBlock "html" "<!-- -->\n" -                                          else RawBlock "markdown" " \n" +      commentSep  = if isPlain +                       then Null +                       else if isEnabled Ext_raw_html opts +                            then RawBlock "html" "<!-- -->\n" +                            else RawBlock "markdown" " \n"    mapM (blockToMarkdown opts) (fixBlocks blocks) >>= return . cat  getKey :: Doc -> Key | 
