Compare commits
No commits in common. "e8963e107b660c60d31b8906bbf664e78b845901" and "ef4d315bf271614def06850a92f182a06f7f5b2a" have entirely different histories.
e8963e107b
...
ef4d315bf2
@ -1 +1 @@
|
|||||||
<table>{#.children}{>table_row/}{/.children}</table>
|
!!!!!!!! table
|
||||||
|
@ -1 +0,0 @@
|
|||||||
<td>{#.children}{>object/}{/.children}</td>
|
|
@ -1 +0,0 @@
|
|||||||
<tr>{#.children}{>table_cell/}{/.children}</tr>
|
|
@ -54,8 +54,6 @@ mod strike_through;
|
|||||||
mod subscript;
|
mod subscript;
|
||||||
mod superscript;
|
mod superscript;
|
||||||
mod table;
|
mod table;
|
||||||
mod table_cell;
|
|
||||||
mod table_row;
|
|
||||||
mod target;
|
mod target;
|
||||||
mod timestamp;
|
mod timestamp;
|
||||||
mod underline;
|
mod underline;
|
||||||
|
@ -6,37 +6,11 @@ use crate::config::Config;
|
|||||||
use crate::error::CustomError;
|
use crate::error::CustomError;
|
||||||
use crate::intermediate::ITable;
|
use crate::intermediate::ITable;
|
||||||
|
|
||||||
use super::macros::render;
|
use super::macros::rnoop;
|
||||||
use super::table_row::RenderTableRow;
|
|
||||||
|
|
||||||
#[derive(Debug, Serialize)]
|
#[derive(Debug, Serialize)]
|
||||||
#[serde(tag = "type")]
|
#[serde(tag = "type")]
|
||||||
#[serde(rename = "table")]
|
#[serde(rename = "table")]
|
||||||
pub(crate) struct RenderTable {
|
pub(crate) struct RenderTable {}
|
||||||
children: Vec<RenderTableRow>,
|
|
||||||
}
|
|
||||||
|
|
||||||
render!(
|
rnoop!(RenderTable, ITable);
|
||||||
RenderTable,
|
|
||||||
ITable,
|
|
||||||
original,
|
|
||||||
config,
|
|
||||||
output_directory,
|
|
||||||
output_file,
|
|
||||||
{
|
|
||||||
let children = {
|
|
||||||
let mut ret = Vec::new();
|
|
||||||
for obj in original.children.iter() {
|
|
||||||
ret.push(RenderTableRow::new(
|
|
||||||
config,
|
|
||||||
output_directory,
|
|
||||||
output_file,
|
|
||||||
obj,
|
|
||||||
)?);
|
|
||||||
}
|
|
||||||
ret
|
|
||||||
};
|
|
||||||
|
|
||||||
Ok(RenderTable { children })
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
@ -1,42 +0,0 @@
|
|||||||
use std::path::Path;
|
|
||||||
|
|
||||||
use serde::Serialize;
|
|
||||||
|
|
||||||
use crate::config::Config;
|
|
||||||
use crate::error::CustomError;
|
|
||||||
use crate::intermediate::ITableCell;
|
|
||||||
|
|
||||||
use super::macros::render;
|
|
||||||
use super::RenderObject;
|
|
||||||
|
|
||||||
#[derive(Debug, Serialize)]
|
|
||||||
#[serde(tag = "type")]
|
|
||||||
#[serde(rename = "table_cell")]
|
|
||||||
pub(crate) struct RenderTableCell {
|
|
||||||
children: Vec<RenderObject>,
|
|
||||||
}
|
|
||||||
|
|
||||||
render!(
|
|
||||||
RenderTableCell,
|
|
||||||
ITableCell,
|
|
||||||
original,
|
|
||||||
config,
|
|
||||||
output_directory,
|
|
||||||
output_file,
|
|
||||||
{
|
|
||||||
let children = {
|
|
||||||
let mut ret = Vec::new();
|
|
||||||
for obj in original.children.iter() {
|
|
||||||
ret.push(RenderObject::new(
|
|
||||||
config,
|
|
||||||
output_directory,
|
|
||||||
output_file,
|
|
||||||
obj,
|
|
||||||
)?);
|
|
||||||
}
|
|
||||||
ret
|
|
||||||
};
|
|
||||||
|
|
||||||
Ok(RenderTableCell { children })
|
|
||||||
}
|
|
||||||
);
|
|
@ -1,42 +0,0 @@
|
|||||||
use std::path::Path;
|
|
||||||
|
|
||||||
use serde::Serialize;
|
|
||||||
|
|
||||||
use crate::config::Config;
|
|
||||||
use crate::error::CustomError;
|
|
||||||
use crate::intermediate::ITableRow;
|
|
||||||
|
|
||||||
use super::macros::render;
|
|
||||||
use super::table_cell::RenderTableCell;
|
|
||||||
|
|
||||||
#[derive(Debug, Serialize)]
|
|
||||||
#[serde(tag = "type")]
|
|
||||||
#[serde(rename = "table_row")]
|
|
||||||
pub(crate) struct RenderTableRow {
|
|
||||||
children: Vec<RenderTableCell>,
|
|
||||||
}
|
|
||||||
|
|
||||||
render!(
|
|
||||||
RenderTableRow,
|
|
||||||
ITableRow,
|
|
||||||
original,
|
|
||||||
config,
|
|
||||||
output_directory,
|
|
||||||
output_file,
|
|
||||||
{
|
|
||||||
let children = {
|
|
||||||
let mut ret = Vec::new();
|
|
||||||
for obj in original.children.iter() {
|
|
||||||
ret.push(RenderTableCell::new(
|
|
||||||
config,
|
|
||||||
output_directory,
|
|
||||||
output_file,
|
|
||||||
obj,
|
|
||||||
)?);
|
|
||||||
}
|
|
||||||
ret
|
|
||||||
};
|
|
||||||
|
|
||||||
Ok(RenderTableRow { children })
|
|
||||||
}
|
|
||||||
);
|
|
@ -56,8 +56,6 @@ mod strike_through;
|
|||||||
mod subscript;
|
mod subscript;
|
||||||
mod superscript;
|
mod superscript;
|
||||||
mod table;
|
mod table;
|
||||||
mod table_cell;
|
|
||||||
mod table_row;
|
|
||||||
mod target;
|
mod target;
|
||||||
mod timestamp;
|
mod timestamp;
|
||||||
mod underline;
|
mod underline;
|
||||||
@ -121,8 +119,6 @@ pub(crate) use strike_through::IStrikeThrough;
|
|||||||
pub(crate) use subscript::ISubscript;
|
pub(crate) use subscript::ISubscript;
|
||||||
pub(crate) use superscript::ISuperscript;
|
pub(crate) use superscript::ISuperscript;
|
||||||
pub(crate) use table::ITable;
|
pub(crate) use table::ITable;
|
||||||
pub(crate) use table_cell::ITableCell;
|
|
||||||
pub(crate) use table_row::ITableRow;
|
|
||||||
pub(crate) use target::ITarget;
|
pub(crate) use target::ITarget;
|
||||||
pub(crate) use timestamp::ITimestamp;
|
pub(crate) use timestamp::ITimestamp;
|
||||||
pub(crate) use underline::IUnderline;
|
pub(crate) use underline::IUnderline;
|
||||||
|
@ -1,21 +1,5 @@
|
|||||||
use super::macros::intermediate;
|
use super::macros::inoop;
|
||||||
|
|
||||||
use super::table_row::ITableRow;
|
|
||||||
use crate::error::CustomError;
|
use crate::error::CustomError;
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
inoop!(ITable, Table);
|
||||||
pub(crate) struct ITable {
|
|
||||||
pub(crate) children: Vec<ITableRow>,
|
|
||||||
}
|
|
||||||
|
|
||||||
intermediate!(ITable, Table, original, registry, {
|
|
||||||
let children = {
|
|
||||||
let mut ret = Vec::new();
|
|
||||||
for obj in original.children.iter() {
|
|
||||||
ret.push(ITableRow::new(registry.clone(), obj).await?);
|
|
||||||
}
|
|
||||||
ret
|
|
||||||
};
|
|
||||||
|
|
||||||
Ok(ITable { children })
|
|
||||||
});
|
|
||||||
|
@ -1,21 +0,0 @@
|
|||||||
use super::macros::intermediate;
|
|
||||||
|
|
||||||
use super::IObject;
|
|
||||||
use crate::error::CustomError;
|
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
|
||||||
pub(crate) struct ITableCell {
|
|
||||||
pub(crate) children: Vec<IObject>,
|
|
||||||
}
|
|
||||||
|
|
||||||
intermediate!(ITableCell, TableCell, 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(ITableCell { children })
|
|
||||||
});
|
|
@ -1,21 +0,0 @@
|
|||||||
use super::macros::intermediate;
|
|
||||||
|
|
||||||
use super::table_cell::ITableCell;
|
|
||||||
use crate::error::CustomError;
|
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
|
||||||
pub(crate) struct ITableRow {
|
|
||||||
pub(crate) children: Vec<ITableCell>,
|
|
||||||
}
|
|
||||||
|
|
||||||
intermediate!(ITableRow, TableRow, original, registry, {
|
|
||||||
let children = {
|
|
||||||
let mut ret = Vec::new();
|
|
||||||
for obj in original.children.iter() {
|
|
||||||
ret.push(ITableCell::new(registry.clone(), obj).await?);
|
|
||||||
}
|
|
||||||
ret
|
|
||||||
};
|
|
||||||
|
|
||||||
Ok(ITableRow { children })
|
|
||||||
});
|
|
Loading…
x
Reference in New Issue
Block a user