Reverse the element order.
This commit is contained in:
parent
0aa8926d6b
commit
fa1d845b76
@ -75,7 +75,7 @@ where
|
||||
}
|
||||
};
|
||||
}
|
||||
// TODO build a vec of the elements by popping off the newest elements of the context
|
||||
ret.reverse();
|
||||
return Ok((remaining, (ret, finish)));
|
||||
}
|
||||
Err(nom::Err::Error(_)) => {
|
||||
@ -132,16 +132,15 @@ pub fn paragraph<'s, 'r>(
|
||||
context.with_additional_node(ContextElement::FailMatcherNode(FailMatcherNode {
|
||||
fail_matcher: ChainBehavior::AndParent(Some(¶graph_end)),
|
||||
}));
|
||||
let ret = context_many_till(¶graph_context, flat_text_element, context_paragraph_end)(i);
|
||||
match ret {
|
||||
Ok(_) => todo!(),
|
||||
Err(e) => {
|
||||
return Err(e);
|
||||
}
|
||||
};
|
||||
// TODO: FIX THIS
|
||||
// ret
|
||||
todo!()
|
||||
let (remaining, (many, till)) =
|
||||
context_many_till(¶graph_context, flat_text_element, context_paragraph_end)(i)?;
|
||||
let many = many
|
||||
.into_iter()
|
||||
.filter_map(|token| match token {
|
||||
Token::TextElement(text_element) => Some(text_element),
|
||||
})
|
||||
.collect();
|
||||
Ok((remaining, (many, till)))
|
||||
}
|
||||
|
||||
fn flat_text_element<'s, 'r>(
|
||||
|
Loading…
x
Reference in New Issue
Block a user