diff --git a/src/parser/paragraph.rs b/src/parser/paragraph.rs index c0f9611..afb641b 100644 --- a/src/parser/paragraph.rs +++ b/src/parser/paragraph.rs @@ -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, }));