Standardize the construction of intermediate BlogPostPage.

This commit is contained in:
Tom Alexander
2023-12-19 17:09:11 -05:00
parent 261fe8a1a2
commit 4bb1f9983a
27 changed files with 405 additions and 248 deletions

View File

@@ -9,14 +9,20 @@ pub(crate) struct IFootnoteReference {
duplicate_offset: usize,
}
intermediate!(IFootnoteReference, FootnoteReference, original, registry, {
let (footnote_id, reference_count) =
get_footnote_reference_id(registry, original.label, &original.definition).await?;
Ok(IFootnoteReference {
footnote_id,
duplicate_offset: reference_count,
})
});
intermediate!(
IFootnoteReference,
&'orig organic::types::FootnoteReference<'parse>,
original,
registry,
{
let (footnote_id, reference_count) =
get_footnote_reference_id(registry, original.label, &original.definition).await?;
Ok(IFootnoteReference {
footnote_id,
duplicate_offset: reference_count,
})
}
);
impl IFootnoteReference {
pub(crate) fn get_display_label(&self) -> String {