natter/src/intermediate/quote_block.rs

32 lines
760 B
Rust
Raw Normal View History

use super::macros::intermediate;
2023-10-27 19:53:18 -04:00
use super::IElement;
use crate::error::CustomError;
2023-12-21 14:56:58 -05:00
use organic::types::StandardProperties;
2023-10-27 17:08:58 -04:00
2023-10-29 15:36:15 -04:00
#[derive(Debug, Clone)]
2023-10-27 19:53:18 -04:00
pub(crate) struct IQuoteBlock {
pub(crate) children: Vec<IElement>,
2023-12-21 14:56:58 -05:00
pub(crate) post_blank: organic::types::PostBlank,
2023-10-27 19:53:18 -04:00
}
2023-10-27 17:08:58 -04:00
intermediate!(
IQuoteBlock,
&'orig organic::types::QuoteBlock<'parse>,
original,
intermediate_context,
{
let children = {
let mut ret = Vec::new();
for obj in original.children.iter() {
ret.push(IElement::new(intermediate_context.clone(), obj).await?);
}
ret
};
2023-10-27 19:53:18 -04:00
2023-12-21 14:56:58 -05:00
Ok(IQuoteBlock {
children,
post_blank: original.get_post_blank(),
})
}
);