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:
@@ -179,7 +179,7 @@ fn _text_markup_object<'r, 's, 'x>(
|
||||
let text_markup_end_specialized = text_markup_end(open.into());
|
||||
let parser_context =
|
||||
context.with_additional_node(ContextElement::ExitMatcherNode(ExitMatcherNode {
|
||||
class: ExitClass::Beta,
|
||||
class: ExitClass::Gamma,
|
||||
exit_matcher: &text_markup_end_specialized,
|
||||
}));
|
||||
|
||||
@@ -229,7 +229,7 @@ fn _text_markup_string<'r, 's, 'x>(
|
||||
let text_markup_end_specialized = text_markup_end(open.into());
|
||||
let parser_context =
|
||||
context.with_additional_node(ContextElement::ExitMatcherNode(ExitMatcherNode {
|
||||
class: ExitClass::Beta,
|
||||
class: ExitClass::Gamma,
|
||||
exit_matcher: &text_markup_end_specialized,
|
||||
}));
|
||||
|
||||
@@ -338,7 +338,7 @@ fn _rematch_text_markup_object<'r, 's, 'x>(
|
||||
let text_markup_end_specialized = text_markup_end(open.into());
|
||||
let parser_context =
|
||||
context.with_additional_node(ContextElement::ExitMatcherNode(ExitMatcherNode {
|
||||
class: ExitClass::Beta,
|
||||
class: ExitClass::Gamma,
|
||||
exit_matcher: &text_markup_end_specialized,
|
||||
}));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user