36 lines
906 B
Rust
36 lines
906 B
Rust
use serde::Serialize;
|
|
|
|
use super::render_context::RenderContext;
|
|
use crate::error::CustomError;
|
|
use crate::intermediate::IFootnoteReference;
|
|
|
|
use super::macros::render;
|
|
|
|
#[derive(Debug, Serialize)]
|
|
#[serde(tag = "type")]
|
|
#[serde(rename = "footnote_reference")]
|
|
pub(crate) struct RenderFootnoteReference {
|
|
reference_id: String,
|
|
definition_link: String,
|
|
label: String,
|
|
post_blank: organic::types::PostBlank,
|
|
}
|
|
|
|
render!(
|
|
RenderFootnoteReference,
|
|
IFootnoteReference,
|
|
original,
|
|
render_context,
|
|
{
|
|
Ok(RenderFootnoteReference {
|
|
reference_id: original.get_reference_id(render_context.id_addition),
|
|
definition_link: format!(
|
|
"#{}",
|
|
original.get_definition_id(render_context.id_addition)
|
|
),
|
|
label: original.get_display_label(),
|
|
post_blank: original.post_blank,
|
|
})
|
|
}
|
|
);
|