Add inline source block.

This commit is contained in:
Tom Alexander 2023-10-29 10:44:32 -04:00
parent eaea37f448
commit 6d83828012
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
3 changed files with 14 additions and 6 deletions

View File

@ -1 +1 @@
!!!!!!!! inline_source_block
<code>{.value}</code>

View File

@ -9,15 +9,19 @@ use crate::intermediate::IInlineSourceBlock;
#[derive(Debug, Serialize)]
#[serde(tag = "type")]
#[serde(rename = "inline_source_block")]
pub(crate) struct RenderInlineSourceBlock {}
pub(crate) struct RenderInlineSourceBlock {
value: String,
}
impl RenderInlineSourceBlock {
pub(crate) fn new(
config: &Config,
output_directory: &Path,
output_file: &Path,
comment: &IInlineSourceBlock,
original: &IInlineSourceBlock,
) -> Result<RenderInlineSourceBlock, CustomError> {
Ok(RenderInlineSourceBlock {})
Ok(RenderInlineSourceBlock {
value: original.value.clone(),
})
}
}

View File

@ -3,13 +3,17 @@ use crate::error::CustomError;
use super::registry::Registry;
#[derive(Debug)]
pub(crate) struct IInlineSourceBlock {}
pub(crate) struct IInlineSourceBlock {
pub(crate) value: String,
}
impl IInlineSourceBlock {
pub(crate) async fn new<'parse>(
registry: &mut Registry<'parse>,
original: &organic::types::InlineSourceBlock<'parse>,
) -> Result<IInlineSourceBlock, CustomError> {
Ok(IInlineSourceBlock {})
Ok(IInlineSourceBlock {
value: original.value.to_owned(),
})
}
}