diff --git a/src/parser/text_element_parser.rs b/src/parser/text_element_parser.rs index 499a3c22..750a1d01 100644 --- a/src/parser/text_element_parser.rs +++ b/src/parser/text_element_parser.rs @@ -222,15 +222,11 @@ fn flat_text_element<'s, 'r>( ))(i) } -fn recognize_bold_end<'s, 'r>(context: Context<'r, 's>, input: &'s str) -> Res<&'s str, &'s str> { - recognize(bold_end)(input) -} - fn flat_bold<'s, 'r>(context: Context<'r, 's>, i: &'s str) -> Res<&'s str, Bold<'s>> { let bold_start = parser_with_context!(context_bold_start)(&context); let nom_context = context.with_additional_node(ContextElement::FailMatcherNode(FailMatcherNode { - fail_matcher: ChainBehavior::AndParent(Some(&recognize_bold_end)), + fail_matcher: ChainBehavior::AndParent(Some(&context_bold_end)), })); let (remaining, captured) = recognize(tuple((bold_start, |i| { context_many_till(&nom_context, flat_text_element, context_bold_end)(i)