Populate render context for footnote references.

This commit is contained in:
Tom Alexander
2023-10-29 12:53:28 -04:00
parent 795945f0da
commit cd27869122
3 changed files with 42 additions and 6 deletions

View File

@@ -9,15 +9,23 @@ use crate::intermediate::IFootnoteReference;
#[derive(Debug, Serialize)]
#[serde(tag = "type")]
#[serde(rename = "footnote_reference")]
pub(crate) struct RenderFootnoteReference {}
pub(crate) struct RenderFootnoteReference {
reference_id: String,
definition_link: String,
label: String,
}
impl RenderFootnoteReference {
pub(crate) fn new(
config: &Config,
output_directory: &Path,
output_file: &Path,
comment: &IFootnoteReference,
original: &IFootnoteReference,
) -> Result<RenderFootnoteReference, CustomError> {
Ok(RenderFootnoteReference {})
Ok(RenderFootnoteReference {
reference_id: original.get_reference_id(),
definition_link: format!("#{}", original.get_definition_id()),
label: original.get_display_label(),
})
}
}