Add templates for text markup.
This commit is contained in:
parent
4c3bea06d1
commit
f6c475c80c
@ -1 +1,3 @@
|
|||||||
bold
|
<b>{#.children}
|
||||||
|
{>object/}
|
||||||
|
{/.children}</b>
|
||||||
|
@ -1 +1 @@
|
|||||||
code
|
<code>{.source}</code>
|
||||||
|
@ -1 +1,3 @@
|
|||||||
italic
|
<i>{#.children}
|
||||||
|
{>object/}
|
||||||
|
{/.children}</i>
|
||||||
|
@ -1 +1 @@
|
|||||||
plain_text
|
{.source}
|
||||||
|
@ -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)]
|
#[derive(Debug, Serialize)]
|
||||||
#[serde(tag = "type")]
|
#[serde(tag = "type")]
|
||||||
#[serde(rename = "plain_text")]
|
#[serde(rename = "plain_text")]
|
||||||
pub(crate) struct RenderPlainText {}
|
pub(crate) struct RenderPlainText {
|
||||||
|
source: String,
|
||||||
|
}
|
||||||
|
|
||||||
impl RenderPlainText {
|
impl RenderPlainText {
|
||||||
pub(crate) fn new(
|
pub(crate) fn new(
|
||||||
config: &Config,
|
config: &Config,
|
||||||
output_directory: &Path,
|
output_directory: &Path,
|
||||||
output_file: &Path,
|
output_file: &Path,
|
||||||
heading: &IPlainText,
|
original: &IPlainText,
|
||||||
) -> Result<RenderPlainText, CustomError> {
|
) -> Result<RenderPlainText, CustomError> {
|
||||||
Ok(RenderPlainText {})
|
Ok(RenderPlainText {
|
||||||
|
source: original.source.clone(),
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ use super::registry::Registry;
|
|||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub(crate) struct IPlainText {
|
pub(crate) struct IPlainText {
|
||||||
source: String,
|
pub(crate) source: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl IPlainText {
|
impl IPlainText {
|
||||||
|
Loading…
Reference in New Issue
Block a user