diff --git a/src/compare/diff.rs b/src/compare/diff.rs index c615290..74ac74f 100644 --- a/src/compare/diff.rs +++ b/src/compare/diff.rs @@ -3296,20 +3296,46 @@ fn compare_export_snippet<'b, 's>( } fn compare_footnote_reference<'b, 's>( - _source: &'s str, + source: &'s str, emacs: &'b Token<'s>, rust: &'b FootnoteReference<'s>, ) -> Result, Box> { - let this_status = DiffStatus::Good; - let message = None; + let mut child_status = Vec::new(); + 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 { status: this_status, name: rust.get_elisp_name(), message, - children: Vec::new(), + children: child_status, rust_source: rust.get_source(), emacs_token: emacs, }