aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-08-28 21:17:08 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-08-28 21:17:08 +0000
commite407279b35e24fc5e0472cfba2c07fc2373aacfb (patch)
treefd9fde22213b2431d906c29fb28af471f0d8d729
parent365c349249c9550da51e03407594a27ce5d2143e (diff)
downloadpandoc-e407279b35e24fc5e0472cfba2c07fc2373aacfb.tar.gz
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
-rw-r--r--src/Text/Pandoc/Shared.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Shared.hs b/src/Text/Pandoc/Shared.hs
index ddc325374..d79345dbe 100644
--- a/src/Text/Pandoc/Shared.hs
+++ b/src/Text/Pandoc/Shared.hs
@@ -218,7 +218,7 @@ a >>~ b = a >>= \x -> b >> return x
-- | Parse any line of text
anyLine :: GenParser Char st [Char]
-anyLine = manyTill anyChar (newline <|> (eof >> return '\n'))
+anyLine = manyTill anyChar newline
-- | Like @manyTill@, but reads at least one item.
many1Till :: GenParser tok st a