diff --git a/src/parser/document.rs b/src/parser/document.rs index 8c50dbd..1c036d5 100644 --- a/src/parser/document.rs +++ b/src/parser/document.rs @@ -328,6 +328,7 @@ fn _heading<'b, 'g, 'r, 's>( let heading_matcher = parser_with_context!(heading(star_count))(context); let (remaining, maybe_section) = opt(map(section_matcher, DocumentElement::Section))(remaining)?; + let (remaining, _ws) = opt(tuple((start_of_line, many0(blank_line))))(remaining)?; let (remaining, mut children) = many0(map(heading_matcher, DocumentElement::Heading))(remaining)?; if let Some(section) = maybe_section {