Compare document category.
This commit is contained in:
@@ -438,7 +438,28 @@ pub fn compare_document<'s>(
|
||||
Ok(_) => {}
|
||||
}
|
||||
|
||||
// TODO: Compare :path :CATEGORY
|
||||
// TODO: Compare :path
|
||||
|
||||
// Compare category
|
||||
let category = get_property_quoted_string(emacs, ":CATEGORY")?;
|
||||
match (category.as_ref(), rust.category) {
|
||||
(None, None) => {}
|
||||
(None, Some(_)) | (Some(_), None) => {
|
||||
this_status = DiffStatus::Bad;
|
||||
message = Some(format!(
|
||||
"Category mismatch (emacs != rust) {:?} != {:?}",
|
||||
category, rust.category
|
||||
));
|
||||
}
|
||||
(Some(e), Some(r)) if e != r => {
|
||||
this_status = DiffStatus::Bad;
|
||||
message = Some(format!(
|
||||
"Category mismatch (emacs != rust) {:?} != {:?}",
|
||||
category, rust.category
|
||||
));
|
||||
}
|
||||
(Some(_), Some(_)) => {}
|
||||
};
|
||||
|
||||
// Skipping "org-data" and its properties
|
||||
for (i, token) in children.iter().skip(2).enumerate() {
|
||||
|
||||
Reference in New Issue
Block a user