Copy the value of latex fragments through the pipeline.

This commit is contained in:
Tom Alexander
2023-10-31 19:14:36 -04:00
parent e2f9938437
commit 8695cf17c5
5 changed files with 81 additions and 23 deletions

View File

@@ -6,18 +6,25 @@ use crate::config::Config;
use crate::error::CustomError;
use crate::intermediate::ILatexFragment;
use super::macros::render;
#[derive(Debug, Serialize)]
#[serde(tag = "type")]
#[serde(rename = "latex_fragment")]
pub(crate) struct RenderLatexFragment {}
impl RenderLatexFragment {
pub(crate) fn new(
_config: &Config,
_output_directory: &Path,
_output_file: &Path,
_comment: &ILatexFragment,
) -> Result<RenderLatexFragment, CustomError> {
Ok(RenderLatexFragment {})
}
pub(crate) struct RenderLatexFragment {
value: String,
}
render!(
RenderLatexFragment,
ILatexFragment,
original,
_config,
_output_directory,
_output_file,
{
Ok(RenderLatexFragment {
value: original.value.clone(),
})
}
);