Implement latex environment.

This commit is contained in:
Tom Alexander 2023-12-30 13:07:16 -05:00
parent 3ec900c8df
commit 492090470c
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -6,6 +6,7 @@ use super::macros::to_wasm;
use super::to_wasm::ToWasm;
use super::AdditionalProperties;
use crate::compare::ElispFact;
use crate::types::GetAffiliatedKeywords;
use crate::types::LatexEnvironment;
use crate::wasm::to_wasm::ToWasmStandardProperties;
@ -13,6 +14,7 @@ use crate::wasm::to_wasm::ToWasmStandardProperties;
pub struct WasmLatexEnvironment {
#[serde(flatten)]
pub(crate) additional_properties: AdditionalProperties,
pub(crate) value: String,
}
to_wasm!(
@ -21,12 +23,17 @@ to_wasm!(
original,
wasm_context,
{ WasmAstNode::LatexEnvironment(original) },
{ "TODO".into() },
{ "latex-environment".into() },
{
let additional_properties = original
.get_affiliated_keywords()
.to_wasm(wasm_context.clone())?;
Ok((
Vec::new(),
WasmLatexEnvironment {
additional_properties: AdditionalProperties::default(),
additional_properties,
value: original.value.to_owned(),
},
))
}