archive
/
md-pdf-rs
Archived
1
Fork 0
This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
md-pdf-rs/src/processors/templating.rs

12 lines
308 B
Rust

use config::Config;
use templating::{render_template, get_errors};
pub fn templating(config: Config, input: String) -> Result<String, String> {
let rendered = render_template(&input, config);
if rendered.is_ok() {
return Ok(rendered.unwrap());
}
return Err(get_errors(rendered));
}