Switch to using with_additional_fail_matcher.
This commit is contained in:
parent
cad8f4bd77
commit
e5af567981
@ -60,11 +60,9 @@ where
|
||||
F: Clone,
|
||||
{
|
||||
not(&mut context.fail_matcher)(i)?;
|
||||
let mut old_fail_matcher_clone = context.fail_matcher.clone();
|
||||
let mut new_context =
|
||||
NomContext::new(move |i| alt((recognize(bold_end), &mut old_fail_matcher_clone))(i));
|
||||
new_context.can_match_bold = context.can_match_bold;
|
||||
new_context.can_match_link = context.can_match_link;
|
||||
let new_context = context
|
||||
.without_bold()
|
||||
.with_additional_fail_matcher(|i| recognize(bold_end)(i));
|
||||
let text_element_parser = parser_with_context!(flat_text_element)(new_context);
|
||||
map(
|
||||
recognize(tuple((
|
||||
|
Loading…
Reference in New Issue
Block a user