Support blank lines between nested headlines.

This commit is contained in:
Tom Alexander 2023-09-08 12:41:48 -04:00
parent b0930df788
commit c2eb1f51c8
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -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 {