Beginning to hand out footnote ids.

This commit is contained in:
Tom Alexander
2023-10-29 12:06:40 -04:00
parent 06dcd22e69
commit 52ca300de3
4 changed files with 69 additions and 4 deletions

View File

@@ -3,13 +3,16 @@ use crate::error::CustomError;
use super::registry::Registry;
#[derive(Debug)]
pub(crate) struct IFootnoteReference {}
pub(crate) struct IFootnoteReference {
footnote_id: usize,
}
impl IFootnoteReference {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
original: &organic::types::FootnoteReference<'parse>,
) -> Result<IFootnoteReference, CustomError> {
Ok(IFootnoteReference {})
let footnote_id = registry.get_footnote_reference_id(original.label, &original.definition);
Ok(IFootnoteReference { footnote_id })
}
}