Check for exit matcher between elements in a plain list item.

This commit is contained in:
Tom Alexander 2023-03-27 18:22:08 -04:00
parent 2c7a559869
commit 3d8fe253c9
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
2 changed files with 4 additions and 1 deletions

View File

@ -55,6 +55,7 @@ impl<'r, 's> ContextTree<'r, 's> {
self.tree.into_iter_until(&other.tree)
}
#[tracing::instrument(ret, level = "debug")]
pub fn check_exit_matcher(
&'r self,
i: &'s str,

View File

@ -57,8 +57,10 @@ pub fn plain_list_item<'r, 's>(
.with_additional_node(ContextElement::ListItem(indent_level));
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) = many0(element_matcher)(remaining)?;
let (remaining, (contents, _exit_contents)) =
many_till(element_matcher, exit_matcher)(remaining)?;
let source = get_consumed(input, remaining);
Ok((