git.iko.soy/typeable/pandoc
on master help sign in
Small performance improvement in list parsing.
commite2c4156c20f113b6f965ccd9313c5aa062cc198f authorJohn MacFarlane <jgm@berkeley.edu> dateSat 7 Dec 2013, 19:41 (13 years ago) parente5a7c31
1 file changed+3−2
src/Text/Pandoc/Readers/Markdown.hs+3−2
src/Text/Pandoc/Readers/Markdown.hs+3−2
@@ -733,8 +733,9 @@ listLine = try $ do
733733 many (spaceChar)
734734 listStart)
735735 notFollowedBy' $ htmlTag (~== TagClose "div")
736− chunks <- manyTill (liftM snd (htmlTag isCommentTag) <|> count 1 anyChar)
737− newline
736+ chunks <- manyTill (liftM snd (htmlTag isCommentTag)
737+ <|> many1 (satisfy (/='\n'))
738+ <|> count 1 anyChar) newline
738739 return $ concat chunks
739740
740741-- parse raw text for one list item, excluding start marker and continuations