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