git.iko.soy/typeable/pandoc
on master help sign in
anyLine now requires that the line end with a newline (not eof).

This is a harmless assumption, since we always add newlines to the end of a block before parsing with anyLine. Yields a 10% speed boost! git-svn-id: https://pandoc.googlecode.com/svn/trunk@944 788f1e2b-df1e-0410-8736-df70ead52e1b

commite407279b35e24fc5e0472cfba2c07fc2373aacfb authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateTue 28 Aug 2007, 21:17 (19 years ago) parent365c349
1 file changed+1−1
src/Text/Pandoc/Shared.hs+1−1
src/Text/Pandoc/Shared.hs+1−1
@@ -218,7 +218,7 @@ a >>~ b = a >>= \x -> b >> return x
218218
219219-- | Parse any line of text
220220anyLine :: GenParser Char st [Char]
221−anyLine = manyTill anyChar (newline <|> (eof >> return '\n'))
221+anyLine = manyTill anyChar newline
222222
223223-- | Like @manyTill@, but reads at least one item.
224224many1Till :: GenParser tok st a