Implement all the text markup.
Some checks failed
rust-foreign-document-test Build rust-foreign-document-test has succeeded
rust-build Build rust-build has failed
rust-test Build rust-test has failed
clippy Build clippy has failed

This commit is contained in:
Tom Alexander 2023-12-29 23:41:15 -05:00
parent 259ad6e242
commit 24c8ac8e21
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
5 changed files with 15 additions and 46 deletions

View File

@ -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(),
},
))
}

View File

@ -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 {}))
}
);

View File

@ -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 {}))
}
);

View File

@ -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 {}))
}
);

View File

@ -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(),
},
))
}