First implementation moving over to the new exit matcher class system.
This commit is contained in:
@@ -2,6 +2,7 @@ use super::error::Res;
|
||||
use super::util::WORD_CONSTITUENT_CHARACTERS;
|
||||
use super::Context;
|
||||
use crate::parser::element::element;
|
||||
use crate::parser::exiting::ExitClass;
|
||||
use crate::parser::greater_element::FootnoteDefinition;
|
||||
use crate::parser::parser_context::ChainBehavior;
|
||||
use crate::parser::parser_context::ContextElement;
|
||||
@@ -37,7 +38,8 @@ pub fn footnote_definition<'r, 's>(
|
||||
let parser_context = context
|
||||
.with_additional_node(ContextElement::ConsumeTrailingWhitespace(true))
|
||||
.with_additional_node(ContextElement::ExitMatcherNode(ExitMatcherNode {
|
||||
exit_matcher: ChainBehavior::IgnoreParent(Some(&footnote_definition_end)),
|
||||
class: ExitClass::Alpha,
|
||||
exit_matcher: &footnote_definition_end,
|
||||
}));
|
||||
// TODO: The problem is we are not accounting for trailing whitespace like we do in section. Maybe it would be easier if we passed down whether or not to parse trailing whitespace into the element matcher similar to how tag takes in parameters.
|
||||
let element_matcher = parser_with_context!(element)(&parser_context);
|
||||
|
||||
Reference in New Issue
Block a user