Footnote definitions are parsing on their own.

This commit is contained in:
Tom Alexander
2023-04-10 11:50:43 -04:00
parent 45db182421
commit e5bc4cb14b
8 changed files with 68 additions and 18 deletions

View File

@@ -8,8 +8,10 @@ use crate::parser::parser_context::ChainBehavior;
use crate::parser::parser_context::ContextElement;
use crate::parser::parser_context::ExitMatcherNode;
use crate::parser::parser_with_context::parser_with_context;
use crate::parser::util::element_trailing_whitespace;
use crate::parser::util::exit_matcher_parser;
use crate::parser::util::get_consumed;
use crate::parser::util::maybe_consume_trailing_whitespace;
use crate::parser::util::start_of_line;
use nom::branch::alt;
use nom::bytes::complete::is_not;
@@ -53,6 +55,11 @@ pub fn greater_block<'r, 's>(
let (remaining, (children, _exit_contents)) =
many_till(element_matcher, exit_matcher)(remaining)?;
let (remaining, _end) = greater_block_end(&parser_context, remaining)?;
// Not checking if parent exit matcher is causing exit because the greater_block_end matcher asserts we matched a full greater block
let (remaining, _trailing_ws) = maybe_consume_trailing_whitespace(context, remaining)?;
let parameters = match parameters {
Some((_ws, parameters)) => Some(parameters),
None => None,