Support empty sections under headings.
This commit is contained in:
parent
950baa9d5d
commit
cc671925db
@ -290,6 +290,13 @@ fn _heading<'r, 's>(
|
||||
if let Some(section) = maybe_section {
|
||||
children.insert(0, section);
|
||||
}
|
||||
let remaining = if children.is_empty() {
|
||||
// Support empty headings
|
||||
let (remain, _ws) = many0(blank_line)(remaining)?;
|
||||
remain
|
||||
} else {
|
||||
remaining
|
||||
};
|
||||
|
||||
let source = get_consumed(input, remaining);
|
||||
Ok((
|
||||
|
Loading…
x
Reference in New Issue
Block a user