diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index a948d5ad3584..e77dda8d70fe 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -733,9 +733,11 @@ listLine = try $ do many (spaceChar) listStart) notFollowedBy' $ htmlTag (~== TagClose "div") - chunks <- manyTill (liftM snd (htmlTag isCommentTag) - <|> many1 (satisfy (/='\n')) - <|> count 1 anyChar) newline + chunks <- manyTill + ( many1 (satisfy $ \c -> c /= '\n' && c /= '<') + <|> liftM snd (htmlTag isCommentTag) + <|> count 1 anyChar + ) newline return $ concat chunks -- parse raw text for one list item, excluding start marker and continuations