Wrap inline footnote definitions in a paragraph tag.
This is to match the behavior of the upstream org html exporter.
This commit is contained in:
parent
01b55b7256
commit
4fb08bc7d0
@ -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::IAstNode;
|
||||||
use super::ast_node::IntoIAstNode;
|
use super::ast_node::IntoIAstNode;
|
||||||
|
use super::IObject;
|
||||||
|
use super::IParagraph;
|
||||||
use super::IntermediateContext;
|
use super::IntermediateContext;
|
||||||
|
|
||||||
type IdCounter = u16;
|
type IdCounter = u16;
|
||||||
@ -148,13 +150,20 @@ async fn convert_reference_contents<'orig, 'parse>(
|
|||||||
intermediate_context: IntermediateContext<'orig, 'parse>,
|
intermediate_context: IntermediateContext<'orig, 'parse>,
|
||||||
contents: &'orig Vec<Object<'parse>>,
|
contents: &'orig Vec<Object<'parse>>,
|
||||||
) -> Result<Vec<IAstNode>, CustomError> {
|
) -> Result<Vec<IAstNode>, CustomError> {
|
||||||
let contents = {
|
let children = {
|
||||||
let mut ret = Vec::new();
|
let mut ret = Vec::new();
|
||||||
for obj in contents.iter() {
|
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
|
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)
|
Ok(contents)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user