Implement the new fields for plain list.
This commit is contained in:
@@ -13,6 +13,8 @@ pub struct PlainList<'s> {
|
||||
pub affiliated_keywords: AffiliatedKeywords<'s>,
|
||||
pub list_type: PlainListType,
|
||||
pub children: Vec<PlainListItem<'s>>,
|
||||
pub contents: Option<&'s str>, // TODO: Can contents ever be None?
|
||||
pub post_blank: Option<&'s str>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
@@ -142,11 +144,15 @@ impl<'s> StandardProperties<'s> for PlainList<'s> {
|
||||
}
|
||||
|
||||
fn get_contents<'b>(&'b self) -> Option<&'s str> {
|
||||
todo!()
|
||||
self.contents
|
||||
}
|
||||
|
||||
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.")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user