Compare footnote reference properties.
This commit is contained in:
parent
e39562c85d
commit
9565435526
@ -3296,20 +3296,46 @@ fn compare_export_snippet<'b, 's>(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn compare_footnote_reference<'b, 's>(
|
fn compare_footnote_reference<'b, 's>(
|
||||||
_source: &'s str,
|
source: &'s str,
|
||||||
emacs: &'b Token<'s>,
|
emacs: &'b Token<'s>,
|
||||||
rust: &'b FootnoteReference<'s>,
|
rust: &'b FootnoteReference<'s>,
|
||||||
) -> Result<DiffEntry<'b, 's>, Box<dyn std::error::Error>> {
|
) -> Result<DiffEntry<'b, 's>, Box<dyn std::error::Error>> {
|
||||||
let this_status = DiffStatus::Good;
|
let mut child_status = Vec::new();
|
||||||
let message = None;
|
let mut this_status = DiffStatus::Good;
|
||||||
|
let mut message = None;
|
||||||
|
|
||||||
// TODO: Compare :label :type
|
compare_children(
|
||||||
|
source,
|
||||||
|
emacs,
|
||||||
|
&rust.definition,
|
||||||
|
&mut child_status,
|
||||||
|
&mut this_status,
|
||||||
|
&mut message,
|
||||||
|
)?;
|
||||||
|
|
||||||
|
if let Some((new_status, new_message)) = compare_properties!(
|
||||||
|
emacs,
|
||||||
|
rust,
|
||||||
|
(
|
||||||
|
EmacsField::Required(":label"),
|
||||||
|
|r| r.label,
|
||||||
|
compare_property_quoted_string
|
||||||
|
),
|
||||||
|
(
|
||||||
|
EmacsField::Required(":type"),
|
||||||
|
|_| Some("inline"),
|
||||||
|
compare_property_unquoted_atom
|
||||||
|
)
|
||||||
|
)? {
|
||||||
|
this_status = new_status;
|
||||||
|
message = new_message;
|
||||||
|
}
|
||||||
|
|
||||||
Ok(DiffResult {
|
Ok(DiffResult {
|
||||||
status: this_status,
|
status: this_status,
|
||||||
name: rust.get_elisp_name(),
|
name: rust.get_elisp_name(),
|
||||||
message,
|
message,
|
||||||
children: Vec::new(),
|
children: child_status,
|
||||||
rust_source: rust.get_source(),
|
rust_source: rust.get_source(),
|
||||||
emacs_token: emacs,
|
emacs_token: emacs,
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user