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")]
|
||||
pub fn paragraph<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<&'s str, Paragraph<'s>> {
|
||||
if immediate_in_section(context, "paragraph") {
|
||||
return Err(nom::Err::Error(CustomError::MyError(MyError(
|
||||
"Cannot nest objects of the same element",
|
||||
))));
|
||||
}
|
||||
let parser_context = context
|
||||
.with_additional_node(ContextElement::Context("paragraph"))
|
||||
.with_additional_node(ContextElement::ExitMatcherNode(ExitMatcherNode {
|
||||
let parser_context =
|
||||
context.with_additional_node(ContextElement::ExitMatcherNode(ExitMatcherNode {
|
||||
class: ExitClass::Beta,
|
||||
exit_matcher: ¶graph_end,
|
||||
}));
|
||||
|
Loading…
Reference in New Issue
Block a user