Wrap the intermediate Registry in an IntermediateContext.
This is currently just to maintain consistency with the render phase's RenderContext but in the future it should allow us to include immutable data that is not locked behind the ArcMutex.
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
use super::macros::intermediate;
|
||||
use super::registry::register_footnote_definition;
|
||||
use super::IntermediateContext;
|
||||
|
||||
use super::IAstNode;
|
||||
use crate::error::CustomError;
|
||||
use crate::intermediate::RefRegistry;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub(crate) struct IFootnoteDefinition {}
|
||||
@@ -12,9 +12,10 @@ intermediate!(
|
||||
IFootnoteDefinition,
|
||||
&'orig organic::types::FootnoteDefinition<'parse>,
|
||||
original,
|
||||
registry,
|
||||
intermediate_context,
|
||||
{
|
||||
register_footnote_definition(registry, original.label, &original.children).await?;
|
||||
register_footnote_definition(intermediate_context, original.label, &original.children)
|
||||
.await?;
|
||||
Ok(IFootnoteDefinition {})
|
||||
}
|
||||
);
|
||||
@@ -27,7 +28,7 @@ pub(crate) struct IRealFootnoteDefinition {
|
||||
|
||||
impl IRealFootnoteDefinition {
|
||||
pub(crate) async fn new<'orig, 'parse>(
|
||||
_registry: RefRegistry<'orig, 'parse>,
|
||||
_intermediate_context: IntermediateContext<'orig, 'parse>,
|
||||
footnote_id: usize,
|
||||
contents: Vec<IAstNode>,
|
||||
) -> Result<IRealFootnoteDefinition, CustomError> {
|
||||
|
||||
Reference in New Issue
Block a user