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)));
|
return Ok((remaining, (ret, finish)));
|
||||||
}
|
}
|
||||||
Err(nom::Err::Error(_)) => {
|
Err(nom::Err::Error(_)) => {
|
||||||
@ -132,16 +132,15 @@ pub fn paragraph<'s, 'r>(
|
|||||||
context.with_additional_node(ContextElement::FailMatcherNode(FailMatcherNode {
|
context.with_additional_node(ContextElement::FailMatcherNode(FailMatcherNode {
|
||||||
fail_matcher: ChainBehavior::AndParent(Some(¶graph_end)),
|
fail_matcher: ChainBehavior::AndParent(Some(¶graph_end)),
|
||||||
}));
|
}));
|
||||||
let ret = context_many_till(¶graph_context, flat_text_element, context_paragraph_end)(i);
|
let (remaining, (many, till)) =
|
||||||
match ret {
|
context_many_till(¶graph_context, flat_text_element, context_paragraph_end)(i)?;
|
||||||
Ok(_) => todo!(),
|
let many = many
|
||||||
Err(e) => {
|
.into_iter()
|
||||||
return Err(e);
|
.filter_map(|token| match token {
|
||||||
}
|
Token::TextElement(text_element) => Some(text_element),
|
||||||
};
|
})
|
||||||
// TODO: FIX THIS
|
.collect();
|
||||||
// ret
|
Ok((remaining, (many, till)))
|
||||||
todo!()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn flat_text_element<'s, 'r>(
|
fn flat_text_element<'s, 'r>(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user