Fix heading post-blank.

This commit is contained in:
Tom Alexander
2023-12-15 19:10:14 -05:00
parent 6b802d36bf
commit 99b74095e6
2 changed files with 10 additions and 10 deletions

View File

@@ -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."),
)
self.post_blank
.map(|text| text.lines().count())
.unwrap_or(0)
.try_into()
.expect("Too much post-blank to fit into a PostBlank.")
}
}