diff --git a/src/parser/greater_block.rs b/src/parser/greater_block.rs index ff7f59c8..99ff8504 100644 --- a/src/parser/greater_block.rs +++ b/src/parser/greater_block.rs @@ -12,6 +12,7 @@ use nom::multi::many_till; use nom::sequence::tuple; use super::org_source::OrgSource; +use super::util::in_section; use super::Context; use crate::error::CustomError; use crate::error::MyError; @@ -26,7 +27,6 @@ use crate::parser::source::SetSource; use crate::parser::util::blank_line; use crate::parser::util::exit_matcher_parser; use crate::parser::util::get_consumed; -use crate::parser::util::immediate_in_section; use crate::parser::util::start_of_line; use crate::parser::Element; use crate::parser::Paragraph; @@ -53,7 +53,7 @@ pub fn greater_block<'r, 's>( "quote" => "quote block".to_owned(), name @ _ => format!("special block {}", name), }; - if immediate_in_section(context, context_name.as_str()) { + if in_section(context, context_name.as_str()) { return Err(nom::Err::Error(CustomError::MyError(MyError( "Cannot nest objects of the same element".into(), ))));