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)]
|
||||
#[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…
Reference in New Issue
Block a user