Make converstion to intermediate state async.
We are going to need to do things like call external tools for syntax highlighting so we are going to need async in there eventually.
This commit is contained in:
@@ -18,7 +18,7 @@ pub(crate) struct BlogPostPage {
|
||||
}
|
||||
|
||||
impl BlogPostPage {
|
||||
pub(crate) fn new<'parse, P: Into<PathBuf>>(
|
||||
pub(crate) async fn new<'parse, P: Into<PathBuf>>(
|
||||
path: P,
|
||||
registry: &mut Registry<'parse>,
|
||||
document: &organic::types::Document<'parse>,
|
||||
@@ -26,10 +26,14 @@ impl BlogPostPage {
|
||||
let path = path.into();
|
||||
let mut children = Vec::new();
|
||||
if let Some(section) = document.zeroth_section.as_ref() {
|
||||
children.push(IDocumentElement::Section(ISection::new(registry, section)?));
|
||||
children.push(IDocumentElement::Section(
|
||||
ISection::new(registry, section).await?,
|
||||
));
|
||||
}
|
||||
for heading in document.children.iter() {
|
||||
children.push(IDocumentElement::Heading(IHeading::new(registry, heading)?));
|
||||
children.push(IDocumentElement::Heading(
|
||||
IHeading::new(registry, heading).await?,
|
||||
));
|
||||
}
|
||||
|
||||
Ok(BlogPostPage {
|
||||
|
||||
Reference in New Issue
Block a user