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:
Tom Alexander 2023-03-31 09:54:48 -04:00
parent 775e703ade
commit 602cf4c374
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -63,11 +63,8 @@ pub fn plain_list_item<'r, 's>(
let element_matcher = parser_with_context!(element)(&parser_context);
let exit_matcher = parser_with_context!(exit_matcher_parser)(&parser_context);
let (remaining, (bull, _ws)) = tuple((bullet, space0))(remaining)?;
let (remaining, (contents, _exit_contents)) = many_till(element_matcher, |i| {
let with_whitespace_added_back = regurgitate(input, i);
exit_matcher(with_whitespace_added_back)
})(remaining)?;
let remaining = regurgitate(input, remaining);
let (remaining, (contents, _exit_contents)) =
many_till(element_matcher, exit_matcher)(remaining)?;
let source = get_consumed(input, remaining);
Ok((