Footnote definitions are parsing on their own.
This commit is contained in:
@@ -21,6 +21,7 @@ use crate::parser::parser_context::ContextElement;
|
||||
use crate::parser::parser_context::ContextTree;
|
||||
use crate::parser::parser_context::ExitMatcherNode;
|
||||
use crate::parser::util::element_trailing_whitespace;
|
||||
use crate::parser::util::maybe_consume_trailing_whitespace;
|
||||
|
||||
use super::element::Element;
|
||||
use super::error::Res;
|
||||
@@ -115,12 +116,7 @@ fn section<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<&'s str, Sec
|
||||
// Check if a parent exit matcher is causing the exit
|
||||
exit_matcher_parser(context, remaining)?;
|
||||
|
||||
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);
|
||||
Ok((remaining, Section { source, children }))
|
||||
|
||||
Reference in New Issue
Block a user