Going to try flatly defined functions and wrap them.

This commit is contained in:
Tom Alexander
2022-07-16 20:42:56 -04:00
parent fdd5b532fc
commit c67de70363
3 changed files with 75 additions and 32 deletions

View File

@@ -24,7 +24,6 @@ use nom::sequence::tuple;
use nom::IResult;
use super::nom_context::NomContext;
use super::text_element_parser::text_element;
pub type Res<T, U> = IResult<T, U, VerboseError<T>>;
@@ -130,7 +129,8 @@ pub fn link_end(input: &str) -> Res<&str, TextElement> {
pub fn paragraph(input: &str) -> Res<&str, (Vec<TextElement>, &str)> {
let initial_context = NomContext::new(&paragraph_end);
many_till(text_element(initial_context), paragraph_end)(input)
// many_till(text_element(initial_context), paragraph_end)(input)
todo!()
}
fn paragraph_end(input: &str) -> Res<&str, &str> {