Don't give paragraph a context since it just contains objects.
This commit is contained in:
parent
45d0ce17c3
commit
400e253cf1
@ -27,14 +27,8 @@ use super::Context;
|
|||||||
|
|
||||||
#[tracing::instrument(ret, level = "debug")]
|
#[tracing::instrument(ret, level = "debug")]
|
||||||
pub fn paragraph<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<&'s str, Paragraph<'s>> {
|
pub fn paragraph<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<&'s str, Paragraph<'s>> {
|
||||||
if immediate_in_section(context, "paragraph") {
|
let parser_context =
|
||||||
return Err(nom::Err::Error(CustomError::MyError(MyError(
|
context.with_additional_node(ContextElement::ExitMatcherNode(ExitMatcherNode {
|
||||||
"Cannot nest objects of the same element",
|
|
||||||
))));
|
|
||||||
}
|
|
||||||
let parser_context = context
|
|
||||||
.with_additional_node(ContextElement::Context("paragraph"))
|
|
||||||
.with_additional_node(ContextElement::ExitMatcherNode(ExitMatcherNode {
|
|
||||||
class: ExitClass::Beta,
|
class: ExitClass::Beta,
|
||||||
exit_matcher: ¶graph_end,
|
exit_matcher: ¶graph_end,
|
||||||
}));
|
}));
|
||||||
|
Loading…
Reference in New Issue
Block a user