Add templates for text markup.

main
Tom Alexander 6 months ago
parent 4c3bea06d1
commit f6c475c80c
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

@ -1 +1,3 @@
bold
<b>{#.children}
{>object/}
{/.children}</b>

@ -1 +1,3 @@
italic
<i>{#.children}
{>object/}
{/.children}</i>

@ -1 +1,3 @@
strike_through
<del>{#.children}
{>object/}
{/.children}</del>

@ -1 +1,3 @@
underline
<u>{#.children}
{>object/}
{/.children}</u>

@ -1 +1 @@
verbatim
<code>{.source}</code>

@ -9,15 +9,19 @@ use crate::intermediate::IPlainText;
#[derive(Debug, Serialize)]
#[serde(tag = "type")]
#[serde(rename = "plain_text")]
pub(crate) struct RenderPlainText {}
pub(crate) struct RenderPlainText {
source: String,
}
impl RenderPlainText {
pub(crate) fn new(
config: &Config,
output_directory: &Path,
output_file: &Path,
heading: &IPlainText,
original: &IPlainText,
) -> Result<RenderPlainText, CustomError> {
Ok(RenderPlainText {})
Ok(RenderPlainText {
source: original.source.clone(),
})
}
}

@ -5,7 +5,7 @@ use super::registry::Registry;
#[derive(Debug)]
pub(crate) struct IPlainText {
source: String,
pub(crate) source: String,
}
impl IPlainText {

Loading…
Cancel
Save