Initial structure for unhighlighted source blocks.
This commit is contained in:
parent
d9a3b13780
commit
313313ae53
@ -9,7 +9,9 @@ use crate::intermediate::ISrcBlock;
|
|||||||
#[derive(Debug, Serialize)]
|
#[derive(Debug, Serialize)]
|
||||||
#[serde(tag = "type")]
|
#[serde(tag = "type")]
|
||||||
#[serde(rename = "src_block")]
|
#[serde(rename = "src_block")]
|
||||||
pub(crate) struct RenderSrcBlock {}
|
pub(crate) struct RenderSrcBlock {
|
||||||
|
lines: Vec<String>,
|
||||||
|
}
|
||||||
|
|
||||||
impl RenderSrcBlock {
|
impl RenderSrcBlock {
|
||||||
pub(crate) fn new(
|
pub(crate) fn new(
|
||||||
@ -18,6 +20,8 @@ impl RenderSrcBlock {
|
|||||||
output_file: &Path,
|
output_file: &Path,
|
||||||
original: &ISrcBlock,
|
original: &ISrcBlock,
|
||||||
) -> Result<RenderSrcBlock, CustomError> {
|
) -> Result<RenderSrcBlock, CustomError> {
|
||||||
Ok(RenderSrcBlock {})
|
Ok(RenderSrcBlock {
|
||||||
|
lines: original.lines.clone(),
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,13 +3,18 @@ use crate::error::CustomError;
|
|||||||
use super::registry::Registry;
|
use super::registry::Registry;
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub(crate) struct ISrcBlock {}
|
pub(crate) struct ISrcBlock {
|
||||||
|
pub(crate) lines: Vec<String>,
|
||||||
|
}
|
||||||
|
|
||||||
impl ISrcBlock {
|
impl ISrcBlock {
|
||||||
pub(crate) async fn new<'parse>(
|
pub(crate) async fn new<'parse>(
|
||||||
registry: &mut Registry<'parse>,
|
registry: &mut Registry<'parse>,
|
||||||
original: &organic::types::SrcBlock<'parse>,
|
original: &organic::types::SrcBlock<'parse>,
|
||||||
) -> Result<ISrcBlock, CustomError> {
|
) -> Result<ISrcBlock, CustomError> {
|
||||||
Ok(ISrcBlock {})
|
// let contents = original.contents.
|
||||||
|
Ok(ISrcBlock {
|
||||||
|
lines: Vec::new(), // TODO
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user