32 lines
716 B
Rust
32 lines
716 B
Rust
use serde::Serialize;
|
|
|
|
use crate::error::CustomError;
|
|
use crate::intermediate::IBold;
|
|
|
|
use super::macros::render;
|
|
use super::render_context::RenderContext;
|
|
use super::RenderObject;
|
|
|
|
#[derive(Debug, Serialize)]
|
|
#[serde(tag = "type")]
|
|
#[serde(rename = "bold")]
|
|
pub(crate) struct RenderBold {
|
|
children: Vec<RenderObject>,
|
|
post_blank: organic::types::PostBlank,
|
|
}
|
|
|
|
render!(RenderBold, IBold, original, render_context, {
|
|
let children = {
|
|
let mut ret = Vec::new();
|
|
for obj in original.children.iter() {
|
|
ret.push(RenderObject::new(render_context.clone(), obj)?);
|
|
}
|
|
ret
|
|
};
|
|
|
|
Ok(RenderBold {
|
|
children,
|
|
post_blank: original.post_blank,
|
|
})
|
|
});
|