Starting to implement the match_fail function to walk up the matcher chain.

This commit is contained in:
Tom Alexander
2022-11-24 16:01:52 -05:00
parent d277a033c9
commit 109a013057
2 changed files with 24 additions and 1 deletions

View File

@@ -6,6 +6,7 @@ use crate::parser::parser_with_context::parser_with_context;
use crate::parser::text::paragraph_end;
use super::nom_context::OrgModeContext;
use super::nom_context::OrgModeContextTree;
use super::text::bold_end;
use super::text::bold_start;
use super::text::line_break;
@@ -28,7 +29,7 @@ fn flat_text_element<'s, 'r>(
i: &'s str,
context: &'r OrgModeContext<'r>,
) -> Res<&'s str, TextElement<'s>> {
// context.not_matching_fail(i)?;
not(|i| context.match_fail(i))(i)?;
alt((
map(span, TextElement::Span),