aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-08-28 02:31:17 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-08-28 02:31:17 +0000
commit08fbfa37cc5bb506fabc532657d603c138b5c474 (patch)
tree642f535993422c72975b885a3f9dda940d51dffd
parent583536a138bd43f40a2633ac4781af672acb22ac (diff)
downloadpandoc-08fbfa37cc5bb506fabc532657d603c138b5c474.tar.gz
Removed unnecessary 'try' in 'anyLine' (Text.Pandoc.Shared).
git-svn-id: https://pandoc.googlecode.com/svn/trunk@923 788f1e2b-df1e-0410-8736-df70ead52e1b
-rw-r--r--src/Text/Pandoc/Shared.hs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Shared.hs b/src/Text/Pandoc/Shared.hs
index 5347a5609..9b5e112b6 100644
--- a/src/Text/Pandoc/Shared.hs
+++ b/src/Text/Pandoc/Shared.hs
@@ -239,8 +239,7 @@ a >>~ b = a >>= \x -> b >> return x
-- | Parse any line of text
anyLine :: GenParser Char st [Char]
-anyLine = try (manyTill anyChar newline) <|> many1 anyChar
- -- second alternative is for a line ending with eof
+anyLine = manyTill anyChar (newline <|> (eof >> return '\n'))
-- | Like @manyTill@, but reads at least one item.
many1Till :: GenParser tok st a