diff --git a/src/parser/paragraph.rs b/src/parser/paragraph.rs index a580596..ef19209 100644 --- a/src/parser/paragraph.rs +++ b/src/parser/paragraph.rs @@ -1,6 +1,5 @@ use nom::branch::alt; use nom::combinator::eof; -use nom::combinator::peek; use nom::combinator::recognize; use nom::combinator::verify; use nom::multi::many1; @@ -32,7 +31,7 @@ pub fn paragraph<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<&'s st let exit_matcher = parser_with_context!(exit_matcher_parser)(&parser_context); let (remaining, (children, _exit_contents)) = verify( - many_till(standard_set_object_matcher, peek(recognize(exit_matcher))), + many_till(standard_set_object_matcher, exit_matcher), |(children, _exit_contents)| !children.is_empty(), )(input)?;