Wrap inline footnote definitions in a paragraph tag.

This is to match the behavior of the upstream org html exporter.
main
Tom Alexander 4 months ago
parent 01b55b7256
commit 4fb08bc7d0
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

@ -29,3 +29,16 @@ intermediate!(
})
}
);
impl IParagraph {
pub(crate) async fn artificial<'orig, 'parse>(
_intermediate_context: crate::intermediate::IntermediateContext<'orig, 'parse>,
children: Vec<IObject>,
post_blank: organic::types::PostBlank,
) -> Result<IParagraph, CustomError> {
Ok(IParagraph {
children,
post_blank,
})
}
}

@ -5,6 +5,8 @@ use std::collections::HashMap;
use super::ast_node::IAstNode;
use super::ast_node::IntoIAstNode;
use super::IObject;
use super::IParagraph;
use super::IntermediateContext;
type IdCounter = u16;
@ -148,13 +150,20 @@ async fn convert_reference_contents<'orig, 'parse>(
intermediate_context: IntermediateContext<'orig, 'parse>,
contents: &'orig Vec<Object<'parse>>,
) -> Result<Vec<IAstNode>, CustomError> {
let contents = {
let children = {
let mut ret = Vec::new();
for obj in contents.iter() {
ret.push(obj.into_ast_node(intermediate_context.clone()).await?);
ret.push(IObject::new(intermediate_context.clone(), obj).await?);
}
ret
};
let containing_paragraph =
IParagraph::artificial(intermediate_context.clone(), children, 0).await?;
let contents = {
let mut ret = Vec::new();
ret.push(IAstNode::Paragraph(containing_paragraph));
ret
};
Ok(contents)
}

Loading…
Cancel
Save