From 08fbfa37cc5bb506fabc532657d603c138b5c474 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Tue, 28 Aug 2007 02:31:17 +0000 Subject: Removed unnecessary 'try' in 'anyLine' (Text.Pandoc.Shared). git-svn-id: https://pandoc.googlecode.com/svn/trunk@923 788f1e2b-df1e-0410-8736-df70ead52e1b --- src/Text/Pandoc/Shared.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/Text') 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 -- cgit v1.2.3