diff options
-rw-r--r-- | src/Text/Pandoc/Readers/Markdown.hs | 2 | ||||
-rw-r--r-- | test/command/7521.md | 11 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index 0f2239394..45594e0fa 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -829,7 +829,7 @@ listLineCommon :: PandocMonad m => MarkdownParser m Text listLineCommon = T.concat <$> manyTill ( many1Char (satisfy $ \c -> c `notElem` ['\n', '<', '`']) <|> fmap snd (withRaw code) - <|> fmap snd (htmlTag isCommentTag) + <|> fmap (renderTags . (:[]) . fst) (htmlTag isCommentTag) <|> countChar 1 anyChar ) newline diff --git a/test/command/7521.md b/test/command/7521.md new file mode 100644 index 000000000..38bc40482 --- /dev/null +++ b/test/command/7521.md @@ -0,0 +1,11 @@ +``` +% pandoc -- --strip-comments +- one + <!-- with comm --> +- two +- ^D +<ul> +<li>one </li> +<li>two</li> +</ul> +``` |