diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-02-12 17:14:11 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-02-12 17:14:11 +0000 |
commit | f3437dd27cbc3e82cdcef7433d0fbff5acd22eb9 (patch) | |
tree | 5226139f8f073770a0d1fc40efaed362113cf9bf /src/Text/ParserCombinators/Pandoc.hs | |
parent | 73cbae72026ad43d80d0005296adb9f5c8fe858a (diff) | |
download | pandoc-f3437dd27cbc3e82cdcef7433d0fbff5acd22eb9.tar.gz |
+ Added some needed "try"s before multicharacter parsers,
especially in "option" contexts.
+ Removed the "try" from the "end" parser in "enclosed"
(Text.Pandoc.Shared). Now "enclosed" behaves like
"option", "manyTill", etc.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@527 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src/Text/ParserCombinators/Pandoc.hs')
-rw-r--r-- | src/Text/ParserCombinators/Pandoc.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/ParserCombinators/Pandoc.hs b/src/Text/ParserCombinators/Pandoc.hs index a825ef8ff..93494241a 100644 --- a/src/Text/ParserCombinators/Pandoc.hs +++ b/src/Text/ParserCombinators/Pandoc.hs @@ -93,14 +93,14 @@ escaped parser = try (do return (Str [result])) -- | Parses material enclosed between start and end parsers. -enclosed :: GenParser Char st t -- ^ start parser +enclosed :: GenParser Char st t -- ^ start parser -> GenParser Char st end -- ^ end parser -> GenParser Char st a -- ^ content parser (to be used repeatedly) -> GenParser Char st [a] enclosed start end parser = try (do start notFollowedBy space - result <- many1Till parser (try end) + result <- many1Till parser end return result) -- | Like @manyTill@, but reads at least one item. |