Remove leading blank lines from heading contents.
This commit is contained in:
parent
e47901a67f
commit
45a506334c
@ -66,7 +66,7 @@ fn _heading<'b, 'g, 'r, 's>(
|
||||
let (remaining, pre_headline) = headline(context, input, parent_star_count)?;
|
||||
let section_matcher = bind_context!(section, context);
|
||||
let heading_matcher = bind_context!(heading(pre_headline.star_count), context);
|
||||
let contents_begin = remaining;
|
||||
let (contents_begin, _) = opt(many0(blank_line))(remaining)?;
|
||||
let (remaining, maybe_section) =
|
||||
opt(map(section_matcher, DocumentElement::Section))(remaining)?;
|
||||
let (remaining, _ws) = opt(tuple((start_of_line, many0(blank_line))))(remaining)?;
|
||||
|
Loading…
Reference in New Issue
Block a user