git.iko.soy/typeable/pandoc
on master help sign in
Removed unnecessary 'try' in 'anyLine' (Text.Pandoc.Shared).

git-svn-id: https://pandoc.googlecode.com/svn/trunk@923 788f1e2b-df1e-0410-8736-df70ead52e1b

commit08fbfa37cc5bb506fabc532657d603c138b5c474 authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateTue 28 Aug 2007, 02:31 (19 years ago) parent583536a
1 file changed+1−2
src/Text/Pandoc/Shared.hs+1−2
src/Text/Pandoc/Shared.hs+1−2
@@ -239,8 +239,7 @@ a >>~ b = a >>= \x -> b >> return x
239239
240240-- | Parse any line of text
241241anyLine :: GenParser Char st [Char]
242−anyLine = try (manyTill anyChar newline) <|> many1 anyChar
243− -- second alternative is for a line ending with eof
242+anyLine = manyTill anyChar (newline <|> (eof >> return '\n'))
244243
245244-- | Like @manyTill@, but reads at least one item.
246245many1Till :: GenParser tok st a