diff options
author | Herwig Stuetz <herwig@herwigstuetz.com> | 2017-05-23 23:21:51 +0200 |
---|---|---|
committer | Herwig Stuetz <herwig@herwigstuetz.com> | 2017-05-28 18:08:11 +0200 |
commit | 5a71632d11f86cb6ed700fe3a4d717a56bad1b9e (patch) | |
tree | a7afa1d1144d7ddb91789da8c5133d50b6178dbe /test/movie.jpg | |
parent | afb551429bb95332f0ccdf882d0dbe8a59aa652a (diff) | |
download | pandoc-5a71632d11f86cb6ed700fe3a4d717a56bad1b9e.tar.gz |
Parsing: `many1Till`: Check for the end condition before parsing
By not checking for the end condition before the first parse, the
parser was applied too often, consuming too much of the input.
This fixes the behaviour of
`testStringWith (many1Till (oneOf "ab") (string "aa")) "aaa"`
which before incorrectly returned `Right "a"`. With this change, it
instead correctly fails with `Left (PandocParsecError ...)` because it
is not able to parse at least one occurence of `oneOf "ab"` that is
not `"aa"`.
Note that this only affects `many1Till p end` where `p` matches on a
prefix of `end`.
Diffstat (limited to 'test/movie.jpg')
0 files changed, 0 insertions, 0 deletions