Add intermediate stage for text markup.
This commit is contained in:
@@ -1,5 +1,21 @@
|
||||
use super::macros::inoop;
|
||||
use super::macros::intermediate;
|
||||
use super::IObject;
|
||||
|
||||
use crate::error::CustomError;
|
||||
|
||||
inoop!(IItalic, Italic);
|
||||
#[derive(Debug, Clone)]
|
||||
pub(crate) struct IItalic {
|
||||
pub(crate) children: Vec<IObject>,
|
||||
}
|
||||
|
||||
intermediate!(IItalic, Italic, original, registry, {
|
||||
let children = {
|
||||
let mut ret = Vec::new();
|
||||
for obj in original.children.iter() {
|
||||
ret.push(IObject::new(registry.clone(), obj).await?);
|
||||
}
|
||||
ret
|
||||
};
|
||||
|
||||
Ok(IItalic { children })
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user