Add paragraph parser.
This commit is contained in:
@@ -28,6 +28,7 @@ use nom::IResult;
|
||||
|
||||
use super::nom_context::NomContext;
|
||||
use super::parser_with_context::parser_with_context;
|
||||
use super::text_element_parser::paragraph;
|
||||
|
||||
pub type Res<T, U> = IResult<T, U, VerboseError<T>>;
|
||||
|
||||
@@ -137,6 +138,6 @@ pub fn paragraph_end(input: &str) -> Res<&str, &str> {
|
||||
|
||||
pub fn document(input: &str) -> Res<&str, Vec<(Vec<TextElement>, &str)>> {
|
||||
let initial_context = NomContext::new(Rc::new(RefCell::new(paragraph_end)));
|
||||
todo!()
|
||||
// many1(parser_with_context!(paragraph)(initial_context))(input)
|
||||
let ret = many1(parser_with_context!(paragraph)(&initial_context))(input);
|
||||
ret
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user