Start of flat text element, not handling more complex types like bold and link.

This commit is contained in:
Tom Alexander
2022-10-15 14:04:24 -04:00
parent 30d6648590
commit ba25f5b5ca
2 changed files with 15 additions and 2 deletions

View File

@@ -25,6 +25,14 @@ fn flat_text_element<'s, 'r>(
i: &'s str,
context: &'r mut NomContext,
) -> Res<&'s str, TextElement<'s>> {
// not(&mut context.fail_matcher)(i)?;
todo!()
context.not_matching_fail(i)?;
alt((
map(span, TextElement::Span),
map(symbol("*"), TextElement::Symbol),
map(symbol("["), TextElement::Symbol),
map(symbol("]"), TextElement::Symbol),
map(space, TextElement::Space),
map(line_break, TextElement::LineBreak),
))(i)
}