File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -282,12 +282,12 @@ consumeWith
282
282
. (String -> Either String { value :: a , consumed :: String , remainder :: String } )
283
283
-> ParserT String m a
284
284
consumeWith f = ParserT
285
- ( mkFn5 \state1@(ParseState input pos _ ) _ _ throw done ->
285
+ ( mkFn5 \state1@(ParseState input pos oldConsumed ) _ _ throw done ->
286
286
case f input of
287
287
Left err ->
288
288
runFn2 throw state1 (ParseError err pos)
289
289
Right { value, consumed, remainder } ->
290
- runFn2 done (ParseState remainder (updatePosString pos consumed remainder) (not (String .null consumed))) value
290
+ runFn2 done (ParseState remainder (updatePosString pos consumed remainder) (oldConsumed || not (String .null consumed))) value
291
291
)
292
292
293
293
-- | Combinator which finds the first position in the input `String` where the
You can’t perform that action at this time.
0 commit comments