Standardize the construction of intermediate BlogPostPage.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user