Skip to content

Commit

Permalink
Another small performance improvement.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgm committed Dec 8, 2013
1 parent e2c4156 commit 8e255fa
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Text/Pandoc/Readers/Markdown.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8e255fa

Please sign in to comment.