Start of flat text element, not handling more complex types like bold and link.
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user