Implement the new fields for keywords.
Some checks failed
clippy Build clippy has failed
rust-foreign-document-test Build rust-foreign-document-test has failed
rust-build Build rust-build has succeeded
rust-test Build rust-test has failed

This commit is contained in:
Tom Alexander
2023-12-11 12:38:13 -05:00
parent 30c03b5529
commit 9cfb2fa052
2 changed files with 11 additions and 3 deletions

View File

@@ -153,6 +153,7 @@ pub struct Keyword<'s> {
pub affiliated_keywords: AffiliatedKeywords<'s>,
pub key: &'s str,
pub value: &'s str,
pub post_blank: Option<&'s str>,
}
#[derive(Debug)]
@@ -387,11 +388,15 @@ impl<'s> StandardProperties<'s> for Keyword<'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.")
}
}