Implement the new fields for inline babel call and inline source block.

This commit is contained in:
Tom Alexander
2023-12-11 14:47:22 -05:00
parent 67a9103b07
commit 0b42139393
3 changed files with 18 additions and 6 deletions

View File

@@ -245,6 +245,7 @@ pub struct InlineBabelCall<'s> {
pub inside_header: Option<&'s str>,
pub arguments: Option<&'s str>,
pub end_header: Option<&'s str>,
pub post_blank: Option<&'s str>,
}
#[derive(Debug)]
@@ -253,6 +254,7 @@ pub struct InlineSourceBlock<'s> {
pub language: &'s str,
pub parameters: Option<&'s str>,
pub value: &'s str,
pub post_blank: Option<&'s str>,
}
#[derive(Debug)]
@@ -871,11 +873,15 @@ impl<'s> StandardProperties<'s> for InlineBabelCall<'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.chars().count())
.unwrap_or(0)
.try_into()
.expect("Too much post-blank to fit into a PostBlank.")
}
}
@@ -885,11 +891,15 @@ impl<'s> StandardProperties<'s> for InlineSourceBlock<'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.chars().count())
.unwrap_or(0)
.try_into()
.expect("Too much post-blank to fit into a PostBlank.")
}
}