Text markup uses confine context.
This commit is contained in:
@@ -57,20 +57,6 @@ pub(crate) fn immediate_in_section<'b, 'g, 'r, 's, 'x>(
|
||||
false
|
||||
}
|
||||
|
||||
/// Check if we are below a section of the given section type regardless of depth
|
||||
pub(crate) fn in_object_section<'b, 'g, 'r, 's, 'x>(
|
||||
context: RefContext<'b, 'g, 'r, 's>,
|
||||
section_name: &'x str,
|
||||
) -> bool {
|
||||
for thing in context.iter() {
|
||||
match thing {
|
||||
ContextElement::ContextObject(name) if *name == section_name => return true,
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
false
|
||||
}
|
||||
|
||||
/// Get a slice of the string that was consumed in a parser using the original input to the parser and the remaining input after the parser.
|
||||
pub(crate) fn get_consumed<'s>(input: OrgSource<'s>, remaining: OrgSource<'s>) -> OrgSource<'s> {
|
||||
input.get_until(remaining)
|
||||
|
||||
Reference in New Issue
Block a user