Support a no-op for headline pre-blank.
This commit is contained in:
@@ -37,9 +37,13 @@ pub struct WasmHeadline {
|
||||
pub(crate) deadline: Option<Box<WasmAstNode>>,
|
||||
pub(crate) closed: Option<Box<WasmAstNode>>,
|
||||
#[serde(rename = "pre-blank")]
|
||||
pub(crate) pre_blank: usize,
|
||||
pub(crate) pre_blank: Noop,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
#[serde(tag = "noop")]
|
||||
pub struct Noop {}
|
||||
|
||||
to_wasm!(
|
||||
WasmHeadline,
|
||||
Heading<'s>,
|
||||
@@ -129,7 +133,7 @@ to_wasm!(
|
||||
})
|
||||
.map_or(Ok(None), |r| r.map(Some))?
|
||||
.map(|child| Box::new(child)),
|
||||
pre_blank: 0, // TODO: Should this be a no-op?
|
||||
pre_blank: Noop {},
|
||||
},
|
||||
))
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ use crate::compare::ElispFact;
|
||||
use crate::types::CheckboxType;
|
||||
use crate::types::PlainListItem;
|
||||
use crate::types::PlainListItemCounter;
|
||||
use crate::types::PlainListItemPreBlank;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
@@ -17,7 +18,7 @@ pub struct WasmPlainListItem {
|
||||
pub(crate) counter: Option<PlainListItemCounter>,
|
||||
pub(crate) checkbox: Option<String>,
|
||||
#[serde(rename = "pre-blank")]
|
||||
pub(crate) pre_blank: usize,
|
||||
pub(crate) pre_blank: PlainListItemPreBlank,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
@@ -52,7 +53,7 @@ to_wasm!(
|
||||
}
|
||||
.to_owned()
|
||||
}),
|
||||
pre_blank: 0, // TODO: Should this be a no-op?
|
||||
pre_blank: original.pre_blank,
|
||||
},
|
||||
))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user