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 {
|
fn get_post_blank(&self) -> PostBlank {
|
||||||
self.children
|
self.post_blank
|
||||||
.last()
|
.map(|text| text.lines().count())
|
||||||
.map(|child| child.get_post_blank())
|
.unwrap_or(0)
|
||||||
.unwrap_or(
|
.try_into()
|
||||||
self.post_blank
|
.expect("Too much post-blank to fit into a PostBlank.")
|
||||||
.map(|text| text.lines().count())
|
|
||||||
.unwrap_or(0)
|
|
||||||
.try_into()
|
|
||||||
.expect("Too much post-blank to fit into a PostBlank."),
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user