Move objects to a lower exit class.
Paragraph's exit matcher which detects elements was causing the plain list parser to exit after the first item was parsed which was causing significant amounts of re-parsing.
This commit is contained in:
@@ -49,7 +49,7 @@ fn name<'r, 's>(
|
||||
) -> Res<OrgSource<'s>, OrgSource<'s>> {
|
||||
let parser_context =
|
||||
context.with_additional_node(ContextElement::ExitMatcherNode(ExitMatcherNode {
|
||||
class: ExitClass::Beta,
|
||||
class: ExitClass::Gamma,
|
||||
exit_matcher: &name_end,
|
||||
}));
|
||||
let (remaining, name) = recognize(many_till(
|
||||
@@ -80,7 +80,7 @@ fn header<'r, 's>(
|
||||
depth: 0,
|
||||
}))
|
||||
.with_additional_node(ContextElement::ExitMatcherNode(ExitMatcherNode {
|
||||
class: ExitClass::Beta,
|
||||
class: ExitClass::Gamma,
|
||||
exit_matcher: &header_end,
|
||||
}));
|
||||
|
||||
@@ -131,7 +131,7 @@ fn argument<'r, 's>(
|
||||
depth: 0,
|
||||
}))
|
||||
.with_additional_node(ContextElement::ExitMatcherNode(ExitMatcherNode {
|
||||
class: ExitClass::Beta,
|
||||
class: ExitClass::Gamma,
|
||||
exit_matcher: &argument_end,
|
||||
}));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user