Fix heading post-blank.
This commit is contained in:
parent
6b802d36bf
commit
99b74095e6
@ -0,0 +1,5 @@
|
||||
* foo
|
||||
|
||||
** bar
|
||||
|
||||
* baz
|
@ -103,16 +103,11 @@ impl<'s> StandardProperties<'s> for Heading<'s> {
|
||||
}
|
||||
|
||||
fn get_post_blank(&self) -> PostBlank {
|
||||
self.children
|
||||
.last()
|
||||
.map(|child| child.get_post_blank())
|
||||
.unwrap_or(
|
||||
self.post_blank
|
||||
.map(|text| text.lines().count())
|
||||
.unwrap_or(0)
|
||||
.try_into()
|
||||
.expect("Too much post-blank to fit into a PostBlank."),
|
||||
)
|
||||
.expect("Too much post-blank to fit into a PostBlank.")
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user