diff --git a/src/compare/diff.rs b/src/compare/diff.rs index 5c42e7d4..6f624e9b 100644 --- a/src/compare/diff.rs +++ b/src/compare/diff.rs @@ -60,6 +60,7 @@ pub fn compare_document<'s>( return Err("Section cannot be after the first child of document.".into()); } child_status.push(compare_section( + rust.source, token, rust.zeroth_section .as_ref() @@ -71,7 +72,7 @@ pub fn compare_document<'s>( .iter() .nth(i - rust.zeroth_section.as_ref().map(|_| 1).unwrap_or(0)) .ok_or("Should have a corresponding heading.")?; - child_status.push(compare_heading(token, rust)?); + child_status.push(compare_heading(rust.source, token, rust)?); } else { return Err("Document should only contain sections and headlines.".into()); } @@ -85,6 +86,7 @@ pub fn compare_document<'s>( } pub fn compare_section<'s>( + source: &'s str, emacs: &'s Token<'s>, rust: &'s Section<'s>, ) -> Result> { @@ -104,6 +106,7 @@ pub fn compare_section<'s>( } pub fn compare_heading<'s>( + source: &'s str, emacs: &'s Token<'s>, rust: &'s Document<'s>, ) -> Result> {