Start adding paragraph.
This commit is contained in:
parent
90d4b11922
commit
5272e2f1b4
@ -68,6 +68,7 @@ pub use additional_property::AdditionalPropertyValue;
|
||||
pub use ast_node::WasmAstNode;
|
||||
pub use document::WasmDocument;
|
||||
pub(crate) use headline::WasmHeadline;
|
||||
pub(crate) use paragraph::WasmParagraph;
|
||||
pub use parse_result::ParseResult;
|
||||
pub(crate) use section::WasmSection;
|
||||
pub(crate) use standard_properties::WasmStandardProperties;
|
||||
|
@ -13,6 +13,7 @@ use crate::wasm::AdditionalPropertyValue;
|
||||
use crate::wasm::WasmAstNode;
|
||||
use crate::wasm::WasmDocument;
|
||||
use crate::wasm::WasmHeadline;
|
||||
use crate::wasm::WasmParagraph;
|
||||
use crate::wasm::WasmSection;
|
||||
use crate::wasm::WasmStandardProperties;
|
||||
use crate::wasm_test::macros::wasm_compare;
|
||||
@ -189,7 +190,7 @@ impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmAstNode<'s, 'p> {
|
||||
WasmAstNode::Document(inner) => inner.compare_ast_node(source, emacs),
|
||||
WasmAstNode::Headline(inner) => inner.compare_ast_node(source, emacs),
|
||||
WasmAstNode::Section(inner) => inner.compare_ast_node(source, emacs),
|
||||
WasmAstNode::Paragraph(_) => todo!(),
|
||||
WasmAstNode::Paragraph(inner) => inner.compare_ast_node(source, emacs),
|
||||
WasmAstNode::PlainList(_) => todo!(),
|
||||
WasmAstNode::PlainListItem(_) => todo!(),
|
||||
WasmAstNode::CenterBlock(_) => todo!(),
|
||||
@ -327,6 +328,33 @@ impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmSection<'s, 'p> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmParagraph<'s, 'p> {
|
||||
fn compare_ast_node<'b>(
|
||||
&self,
|
||||
source: &'s str,
|
||||
emacs: &'b Token<'s>,
|
||||
) -> Result<WasmDiffResult<'s>, Box<dyn std::error::Error>> {
|
||||
let result = WasmDiffResult::default();
|
||||
// let result = wasm_compare!(
|
||||
// source,
|
||||
// emacs,
|
||||
// self,
|
||||
// (
|
||||
// EmacsField::Required(":path"),
|
||||
// |w| w.path.as_ref().and_then(|p| p.to_str()),
|
||||
// wasm_compare_property_quoted_string
|
||||
// ),
|
||||
// (
|
||||
// EmacsField::Required(":CATEGORY"),
|
||||
// |w| w.category.as_ref(),
|
||||
// wasm_compare_property_quoted_string
|
||||
// )
|
||||
// );
|
||||
|
||||
Ok(result)
|
||||
}
|
||||
}
|
||||
|
||||
fn wasm_compare_property_quoted_string<
|
||||
'b,
|
||||
's,
|
||||
|
Loading…
Reference in New Issue
Block a user