Implement the new fields for horizontal rule.

This commit is contained in:
Tom Alexander
2023-12-15 12:50:01 -05:00
parent 60d1ecfa75
commit 2181993246
2 changed files with 9 additions and 3 deletions

View File

@@ -155,6 +155,7 @@ pub struct FixedWidthArea<'s> {
pub struct HorizontalRule<'s> {
pub source: &'s str,
pub affiliated_keywords: AffiliatedKeywords<'s>,
pub post_blank: Option<&'s str>,
}
#[derive(Debug)]
@@ -422,11 +423,15 @@ impl<'s> StandardProperties<'s> for HorizontalRule<'s> {
}
fn get_contents<'b>(&'b self) -> Option<&'s str> {
todo!()
None
}
fn get_post_blank(&self) -> PostBlank {
todo!()
self.post_blank
.map(|text| text.lines().count())
.unwrap_or(0)
.try_into()
.expect("Too much post-blank to fit into a PostBlank.")
}
}