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