Create an intermediate ast node type.

This commit is contained in:
Tom Alexander
2023-10-29 13:51:32 -04:00
parent cd27869122
commit 6109902945
6 changed files with 389 additions and 18 deletions

View File

@@ -2,6 +2,7 @@ use std::path::PathBuf;
use crate::error::CustomError;
use super::footnote_definition::IRealFootnoteDefinition;
use super::registry::Registry;
use super::IDocumentElement;
use super::IHeading;
@@ -15,6 +16,8 @@ pub(crate) struct BlogPostPage {
pub(crate) title: Option<String>,
pub(crate) children: Vec<IDocumentElement>,
pub(crate) footnotes: Vec<IRealFootnoteDefinition>,
}
impl BlogPostPage {
@@ -36,10 +39,13 @@ impl BlogPostPage {
));
}
// TODO: Get footnote definitions
Ok(BlogPostPage {
path,
title: get_title(&document),
children,
footnotes: Vec::new(), // TODO
})
}