Removing regurgitate calls.
This hacky solution ends up with whitespace getting captured twice so I will need to either use context or a separate parser.
This commit is contained in:
parent
775e703ade
commit
602cf4c374
@ -63,11 +63,8 @@ pub fn plain_list_item<'r, 's>(
|
|||||||
let element_matcher = parser_with_context!(element)(&parser_context);
|
let element_matcher = parser_with_context!(element)(&parser_context);
|
||||||
let exit_matcher = parser_with_context!(exit_matcher_parser)(&parser_context);
|
let exit_matcher = parser_with_context!(exit_matcher_parser)(&parser_context);
|
||||||
let (remaining, (bull, _ws)) = tuple((bullet, space0))(remaining)?;
|
let (remaining, (bull, _ws)) = tuple((bullet, space0))(remaining)?;
|
||||||
let (remaining, (contents, _exit_contents)) = many_till(element_matcher, |i| {
|
let (remaining, (contents, _exit_contents)) =
|
||||||
let with_whitespace_added_back = regurgitate(input, i);
|
many_till(element_matcher, exit_matcher)(remaining)?;
|
||||||
exit_matcher(with_whitespace_added_back)
|
|
||||||
})(remaining)?;
|
|
||||||
let remaining = regurgitate(input, remaining);
|
|
||||||
let source = get_consumed(input, remaining);
|
let source = get_consumed(input, remaining);
|
||||||
|
|
||||||
Ok((
|
Ok((
|
||||||
|
Loading…
Reference in New Issue
Block a user