Move the text element parser into the text module.
This commit is contained in:
@@ -5,9 +5,9 @@ use super::parser_context::ContextElement;
|
||||
use super::parser_context::ExitMatcherNode;
|
||||
use super::text::blank_line;
|
||||
use super::text::line_break;
|
||||
use super::text::text_element;
|
||||
use super::text::Paragraph;
|
||||
use super::text::TextElement;
|
||||
use super::text_element_parser::flat_text_element;
|
||||
use super::token::Token;
|
||||
use super::Context;
|
||||
use nom::branch::alt;
|
||||
@@ -27,7 +27,7 @@ pub fn paragraph<'s, 'r>(context: Context<'r, 's>, i: &'s str) -> Res<&'s str, P
|
||||
}))
|
||||
.with_additional_node(ContextElement::StartOfParagraph);
|
||||
let (remaining, (many, till)) =
|
||||
context_many_till(¶graph_context, flat_text_element, context_paragraph_end)(i)?;
|
||||
context_many_till(¶graph_context, text_element, context_paragraph_end)(i)?;
|
||||
let many = many
|
||||
.into_iter()
|
||||
.filter_map(|token| match token {
|
||||
|
||||
Reference in New Issue
Block a user