25 lines
602 B
Rust
25 lines
602 B
Rust
use serde::Serialize;
|
|
|
|
use super::render_context::RenderContext;
|
|
use crate::error::CustomError;
|
|
use crate::intermediate::ISrcBlock;
|
|
|
|
use super::macros::render;
|
|
|
|
#[derive(Debug, Serialize)]
|
|
#[serde(tag = "type")]
|
|
#[serde(rename = "src_block")]
|
|
pub(crate) struct RenderSrcBlock {
|
|
lines: Vec<String>,
|
|
language: Option<String>,
|
|
post_blank: organic::types::PostBlank,
|
|
}
|
|
|
|
render!(RenderSrcBlock, ISrcBlock, original, _render_context, {
|
|
Ok(RenderSrcBlock {
|
|
lines: original.lines.clone(),
|
|
language: original.language.clone(),
|
|
post_blank: original.post_blank,
|
|
})
|
|
});
|