Add entity.
This commit is contained in:
parent
dbea9318e9
commit
793789bdf2
@ -1 +1 @@
|
|||||||
entity
|
{.html|s}
|
||||||
|
@ -9,15 +9,19 @@ use crate::intermediate::IEntity;
|
|||||||
#[derive(Debug, Serialize)]
|
#[derive(Debug, Serialize)]
|
||||||
#[serde(tag = "type")]
|
#[serde(tag = "type")]
|
||||||
#[serde(rename = "entity")]
|
#[serde(rename = "entity")]
|
||||||
pub(crate) struct RenderEntity {}
|
pub(crate) struct RenderEntity {
|
||||||
|
html: String,
|
||||||
|
}
|
||||||
|
|
||||||
impl RenderEntity {
|
impl RenderEntity {
|
||||||
pub(crate) fn new(
|
pub(crate) fn new(
|
||||||
config: &Config,
|
config: &Config,
|
||||||
output_directory: &Path,
|
output_directory: &Path,
|
||||||
output_file: &Path,
|
output_file: &Path,
|
||||||
comment: &IEntity,
|
entity: &IEntity,
|
||||||
) -> Result<RenderEntity, CustomError> {
|
) -> Result<RenderEntity, CustomError> {
|
||||||
Ok(RenderEntity {})
|
Ok(RenderEntity {
|
||||||
|
html: entity.html.clone(),
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,13 +3,17 @@ use crate::error::CustomError;
|
|||||||
use super::registry::Registry;
|
use super::registry::Registry;
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub(crate) struct IEntity {}
|
pub(crate) struct IEntity {
|
||||||
|
pub(crate) html: String,
|
||||||
|
}
|
||||||
|
|
||||||
impl IEntity {
|
impl IEntity {
|
||||||
pub(crate) async fn new<'parse>(
|
pub(crate) async fn new<'parse>(
|
||||||
registry: &mut Registry<'parse>,
|
registry: &mut Registry<'parse>,
|
||||||
original: &organic::types::Entity<'parse>,
|
original: &organic::types::Entity<'parse>,
|
||||||
) -> Result<IEntity, CustomError> {
|
) -> Result<IEntity, CustomError> {
|
||||||
Ok(IEntity {})
|
Ok(IEntity {
|
||||||
|
html: original.html.to_owned(),
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user