Make the item tag exit matcher a lower class than all all others.

This is to allow for " :: " inside a description list item's tag if it is nested inside another object.
This commit is contained in:
Tom Alexander
2023-09-08 14:02:15 -04:00
parent ab612f293f
commit 40f22034da
3 changed files with 30 additions and 24 deletions

View File

@@ -108,7 +108,7 @@ impl<'g, 'r, 's> Context<'g, 'r, 's> {
&'r self,
i: OrgSource<'s>,
) -> IResult<OrgSource<'s>, OrgSource<'s>, CustomError<OrgSource<'s>>> {
let mut current_class_filter = ExitClass::Gamma;
let mut current_class_filter = ExitClass::Delta;
for current_node in self.iter_context() {
let context_element = current_node.get_data();
match context_element {

View File

@@ -1,16 +1,10 @@
#[derive(Debug, Copy, Clone)]
pub enum ExitClass {
/// Headlines and sections.
Document = 1,
/// Elements who take priority over beta elements when matching.
Alpha = 20,
/// Elements who cede priority to alpha elements when matching.
Beta = 300,
/// Elements who cede priority to alpha and beta elements when matching.
Gamma = 4000,
Alpha = 2,
Beta = 3,
Gamma = 4,
Delta = 5,
}
impl std::fmt::Display for ExitClass {