Implement all the text markup.
This commit is contained in:
parent
259ad6e242
commit
24c8ac8e21
@ -4,15 +4,13 @@ use serde::Serialize;
|
||||
use super::ast_node::WasmAstNode;
|
||||
use super::macros::to_wasm;
|
||||
use super::to_wasm::ToWasm;
|
||||
use super::AdditionalProperties;
|
||||
use crate::compare::ElispFact;
|
||||
use crate::types::Code;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct WasmCode {
|
||||
#[serde(flatten)]
|
||||
pub(crate) additional_properties: AdditionalProperties,
|
||||
pub(crate) value: String,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
@ -21,12 +19,12 @@ to_wasm!(
|
||||
original,
|
||||
wasm_context,
|
||||
{ WasmAstNode::Code(original) },
|
||||
{ "TODO".into() },
|
||||
{ "code".into() },
|
||||
{
|
||||
Ok((
|
||||
Vec::new(),
|
||||
WasmCode {
|
||||
additional_properties: AdditionalProperties::default(),
|
||||
value: original.contents.to_owned(),
|
||||
},
|
||||
))
|
||||
}
|
||||
|
@ -4,16 +4,12 @@ use serde::Serialize;
|
||||
use super::ast_node::WasmAstNode;
|
||||
use super::macros::to_wasm;
|
||||
use super::to_wasm::ToWasm;
|
||||
use super::AdditionalProperties;
|
||||
use crate::compare::ElispFact;
|
||||
use crate::types::Italic;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct WasmItalic {
|
||||
#[serde(flatten)]
|
||||
pub(crate) additional_properties: AdditionalProperties,
|
||||
}
|
||||
pub struct WasmItalic {}
|
||||
|
||||
to_wasm!(
|
||||
WasmItalic,
|
||||
@ -21,7 +17,7 @@ to_wasm!(
|
||||
original,
|
||||
wasm_context,
|
||||
{ WasmAstNode::Italic(original) },
|
||||
{ "TODO".into() },
|
||||
{ "italic".into() },
|
||||
{
|
||||
let children = original
|
||||
.children
|
||||
@ -33,11 +29,6 @@ to_wasm!(
|
||||
})
|
||||
.collect::<Result<Vec<_>, _>>()?;
|
||||
|
||||
Ok((
|
||||
children,
|
||||
WasmItalic {
|
||||
additional_properties: AdditionalProperties::default(),
|
||||
},
|
||||
))
|
||||
Ok((children, WasmItalic {}))
|
||||
}
|
||||
);
|
||||
|
@ -4,16 +4,12 @@ use serde::Serialize;
|
||||
use super::ast_node::WasmAstNode;
|
||||
use super::macros::to_wasm;
|
||||
use super::to_wasm::ToWasm;
|
||||
use super::AdditionalProperties;
|
||||
use crate::compare::ElispFact;
|
||||
use crate::types::StrikeThrough;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct WasmStrikeThrough {
|
||||
#[serde(flatten)]
|
||||
pub(crate) additional_properties: AdditionalProperties,
|
||||
}
|
||||
pub struct WasmStrikeThrough {}
|
||||
|
||||
to_wasm!(
|
||||
WasmStrikeThrough,
|
||||
@ -21,7 +17,7 @@ to_wasm!(
|
||||
original,
|
||||
wasm_context,
|
||||
{ WasmAstNode::StrikeThrough(original) },
|
||||
{ "TODO".into() },
|
||||
{ "strike-through".into() },
|
||||
{
|
||||
let children = original
|
||||
.children
|
||||
@ -33,11 +29,6 @@ to_wasm!(
|
||||
})
|
||||
.collect::<Result<Vec<_>, _>>()?;
|
||||
|
||||
Ok((
|
||||
children,
|
||||
WasmStrikeThrough {
|
||||
additional_properties: AdditionalProperties::default(),
|
||||
},
|
||||
))
|
||||
Ok((children, WasmStrikeThrough {}))
|
||||
}
|
||||
);
|
||||
|
@ -4,16 +4,12 @@ use serde::Serialize;
|
||||
use super::ast_node::WasmAstNode;
|
||||
use super::macros::to_wasm;
|
||||
use super::to_wasm::ToWasm;
|
||||
use super::AdditionalProperties;
|
||||
use crate::compare::ElispFact;
|
||||
use crate::types::Underline;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct WasmUnderline {
|
||||
#[serde(flatten)]
|
||||
pub(crate) additional_properties: AdditionalProperties,
|
||||
}
|
||||
pub struct WasmUnderline {}
|
||||
|
||||
to_wasm!(
|
||||
WasmUnderline,
|
||||
@ -21,7 +17,7 @@ to_wasm!(
|
||||
original,
|
||||
wasm_context,
|
||||
{ WasmAstNode::Underline(original) },
|
||||
{ "TODO".into() },
|
||||
{ "underline".into() },
|
||||
{
|
||||
let children = original
|
||||
.children
|
||||
@ -33,11 +29,6 @@ to_wasm!(
|
||||
})
|
||||
.collect::<Result<Vec<_>, _>>()?;
|
||||
|
||||
Ok((
|
||||
children,
|
||||
WasmUnderline {
|
||||
additional_properties: AdditionalProperties::default(),
|
||||
},
|
||||
))
|
||||
Ok((children, WasmUnderline {}))
|
||||
}
|
||||
);
|
||||
|
@ -4,15 +4,13 @@ use serde::Serialize;
|
||||
use super::ast_node::WasmAstNode;
|
||||
use super::macros::to_wasm;
|
||||
use super::to_wasm::ToWasm;
|
||||
use super::AdditionalProperties;
|
||||
use crate::compare::ElispFact;
|
||||
use crate::types::Verbatim;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct WasmVerbatim {
|
||||
#[serde(flatten)]
|
||||
pub(crate) additional_properties: AdditionalProperties,
|
||||
pub(crate) value: String,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
@ -21,12 +19,12 @@ to_wasm!(
|
||||
original,
|
||||
wasm_context,
|
||||
{ WasmAstNode::Verbatim(original) },
|
||||
{ "TODO".into() },
|
||||
{ "verbatim".into() },
|
||||
{
|
||||
Ok((
|
||||
Vec::new(),
|
||||
WasmVerbatim {
|
||||
additional_properties: AdditionalProperties::default(),
|
||||
value: original.contents.to_owned(),
|
||||
},
|
||||
))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user