From 8e255fad98baf2448d8c1866d7c03c5d110a505f Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 7 Dec 2013 19:56:54 -0800 Subject: Another small performance improvement. --- src/Text/Pandoc/Readers/Markdown.hs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/Text/Pandoc') diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index a948d5ad3..e77dda8d7 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 -- cgit v1.2.3