Check for exit matcher between elements in a plain list item.
This commit is contained in:
parent
2c7a559869
commit
3d8fe253c9
@ -55,6 +55,7 @@ impl<'r, 's> ContextTree<'r, 's> {
|
|||||||
self.tree.into_iter_until(&other.tree)
|
self.tree.into_iter_until(&other.tree)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[tracing::instrument(ret, level = "debug")]
|
||||||
pub fn check_exit_matcher(
|
pub fn check_exit_matcher(
|
||||||
&'r self,
|
&'r self,
|
||||||
i: &'s str,
|
i: &'s str,
|
||||||
|
@ -57,8 +57,10 @@ pub fn plain_list_item<'r, 's>(
|
|||||||
.with_additional_node(ContextElement::ListItem(indent_level));
|
.with_additional_node(ContextElement::ListItem(indent_level));
|
||||||
|
|
||||||
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 (remaining, (bull, _ws)) = tuple((bullet, space0))(remaining)?;
|
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);
|
let source = get_consumed(input, remaining);
|
||||||
|
|
||||||
Ok((
|
Ok((
|
||||||
|
Loading…
Reference in New Issue
Block a user