Get post blank for footnote references.

This commit is contained in:
Tom Alexander
2023-10-31 22:57:11 -04:00
parent 645d9abf9c
commit b1773ac90e
3 changed files with 13 additions and 7 deletions

View File

@@ -193,6 +193,7 @@ pub struct ExportSnippet<'s> {
pub struct FootnoteReference<'s> {
pub source: &'s str,
pub contents: Option<&'s str>,
pub post_blank: Option<&'s str>,
pub label: Option<&'s str>,
pub definition: Vec<Object<'s>>,
}
@@ -736,7 +737,11 @@ impl<'s> StandardProperties<'s> for FootnoteReference<'s> {
}
fn get_post_blank<'b>(&'b self) -> PostBlank {
todo!()
self.post_blank
.map(|text| text.chars().count())
.unwrap_or(0)
.try_into()
.expect("Too much post-blank to fit into a PostBlank.")
}
}