diff --git a/src/parser/footnote_definition.rs b/src/parser/footnote_definition.rs index 661b5d2..a16159a 100644 --- a/src/parser/footnote_definition.rs +++ b/src/parser/footnote_definition.rs @@ -76,8 +76,13 @@ fn footnote_definition_end<'r, 's>( ) -> Res<&'s str, &'s str> { let start_of_line_matcher = parser_with_context!(start_of_line)(context); let footnote_definition_matcher = parser_with_context!(footnote_definition)(context); + let maybe_consume_trailing_whitespace_matcher = + parser_with_context!(maybe_consume_trailing_whitespace)(context); alt(( - recognize(tuple((multispace0, footnote_definition_matcher))), + recognize(tuple(( + maybe_consume_trailing_whitespace_matcher, + footnote_definition_matcher, + ))), recognize(tuple(( start_of_line_matcher, verify(many1(blank_line), |lines: &Vec<&str>| lines.len() >= 2),