Add comment as a no-op.
This commit is contained in:
16
src/intermediate/comment.rs
Normal file
16
src/intermediate/comment.rs
Normal file
@@ -0,0 +1,16 @@
|
||||
use crate::error::CustomError;
|
||||
|
||||
use super::registry::Registry;
|
||||
|
||||
/// Essentially a no-op since the comment is not rendered.
|
||||
#[derive(Debug)]
|
||||
pub(crate) struct IComment {}
|
||||
|
||||
impl IComment {
|
||||
pub(crate) async fn new<'parse>(
|
||||
registry: &mut Registry<'parse>,
|
||||
comment: &organic::types::Comment<'parse>,
|
||||
) -> Result<IComment, CustomError> {
|
||||
Ok(IComment {})
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
use crate::error::CustomError;
|
||||
|
||||
use super::comment::IComment;
|
||||
use super::keyword::IKeyword;
|
||||
use super::registry::Registry;
|
||||
use super::IParagraph;
|
||||
@@ -8,6 +9,7 @@ use super::IParagraph;
|
||||
pub(crate) enum IElement {
|
||||
Paragraph(IParagraph),
|
||||
Keyword(IKeyword),
|
||||
Comment(IComment),
|
||||
}
|
||||
|
||||
impl IElement {
|
||||
@@ -25,7 +27,9 @@ impl IElement {
|
||||
organic::types::Element::SpecialBlock(_) => todo!(),
|
||||
organic::types::Element::DynamicBlock(_) => todo!(),
|
||||
organic::types::Element::FootnoteDefinition(_) => todo!(),
|
||||
organic::types::Element::Comment(_) => todo!(),
|
||||
organic::types::Element::Comment(inner) => {
|
||||
Ok(IElement::Comment(IComment::new(registry, inner).await?))
|
||||
}
|
||||
organic::types::Element::Drawer(_) => todo!(),
|
||||
organic::types::Element::PropertyDrawer(_) => todo!(),
|
||||
organic::types::Element::Table(_) => todo!(),
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
use crate::error::CustomError;
|
||||
|
||||
use super::registry::Registry;
|
||||
use super::IObject;
|
||||
|
||||
/// Essentially a no-op since the keyword is not rendered and any relevant impact on other elements is pulled from the parsed form of keyword.
|
||||
#[derive(Debug)]
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
mod comment;
|
||||
mod convert;
|
||||
mod definition;
|
||||
mod document_element;
|
||||
@@ -12,6 +13,7 @@ mod registry;
|
||||
mod section;
|
||||
mod target;
|
||||
mod util;
|
||||
pub(crate) use comment::IComment;
|
||||
pub(crate) use convert::convert_blog_post_page_to_render_context;
|
||||
pub(crate) use definition::BlogPost;
|
||||
pub(crate) use document_element::IDocumentElement;
|
||||
|
||||
Reference in New Issue
Block a user