organic/src/parser/text_element_parser.rs

23 lines
607 B
Rust
Raw Normal View History

2022-07-16 03:26:49 +00:00
//! A single element of text.
2022-07-17 01:32:23 +00:00
use crate::parser::parser_with_context::parser_with_context;
use crate::parser::text::paragraph_end;
2022-07-16 03:26:49 +00:00
use super::nom_context::NomContext;
2022-07-17 01:55:33 +00:00
use super::text::bold_end;
use super::text::bold_start;
2022-07-16 03:26:49 +00:00
use super::text::line_break;
use super::text::space;
use super::text::span;
use super::text::symbol;
2022-07-17 01:55:33 +00:00
use super::text::Bold;
use super::text::Res;
2022-07-16 03:26:49 +00:00
use super::text::TextElement;
use nom::branch::alt;
use nom::combinator::map;
use nom::combinator::not;
2022-07-17 01:55:33 +00:00
use nom::combinator::recognize;
2022-07-16 03:26:49 +00:00
use nom::error::VerboseError;
2022-07-17 01:32:23 +00:00
use nom::multi::many_till;
2022-07-17 01:55:33 +00:00
use nom::sequence::tuple;
2022-07-16 03:26:49 +00:00
use nom::IResult;