diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-08-28 02:31:17 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-08-28 02:31:17 +0000 |
commit | 08fbfa37cc5bb506fabc532657d603c138b5c474 (patch) | |
tree | 642f535993422c72975b885a3f9dda940d51dffd /src | |
parent | 583536a138bd43f40a2633ac4781af672acb22ac (diff) | |
download | pandoc-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
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Shared.hs | 3 |
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 |