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

@@ -14,6 +14,7 @@ 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::maybe_consume_trailing_whitespace;
use crate::parser::util::start_of_line;
use super::element::non_paragraph_element;
@@ -39,13 +40,7 @@ pub fn paragraph<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<&'s st
// Not checking parent exit matcher because if there are any children matched then we have a valid paragraph.
let (remaining, _trailing_ws) = if context.should_consume_trailing_whitespace() {
opt(parser_with_context!(element_trailing_whitespace)(
&parser_context,
))(remaining)?
} else {
(remaining, None)
};
let (remaining, _trailing_ws) = maybe_consume_trailing_whitespace(context, remaining)?;
let source = get_consumed(input, remaining);