Implement the new fields for radio link.
This commit is contained in:
@@ -128,6 +128,7 @@ pub struct RadioTarget<'s> {
|
||||
pub struct RadioLink<'s> {
|
||||
pub source: &'s str,
|
||||
pub path: &'s str,
|
||||
pub post_blank: Option<&'s str>,
|
||||
pub children: Vec<Object<'s>>,
|
||||
}
|
||||
|
||||
@@ -671,11 +672,15 @@ impl<'s> StandardProperties<'s> for RadioLink<'s> {
|
||||
}
|
||||
|
||||
fn get_contents<'b>(&'b self) -> Option<&'s str> {
|
||||
todo!()
|
||||
Some(self.path)
|
||||
}
|
||||
|
||||
fn get_post_blank(&self) -> PostBlank {
|
||||
todo!()
|
||||
self.post_blank
|
||||
.map(|post_blank| post_blank.chars().count())
|
||||
.unwrap_or(0)
|
||||
.try_into()
|
||||
.expect("Too much post-blank to fit into a PostBlank.")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user