Compare range type.
This commit is contained in:
@@ -74,6 +74,7 @@ use crate::types::TableCell;
|
||||
use crate::types::TableRow;
|
||||
use crate::types::Target;
|
||||
use crate::types::Timestamp;
|
||||
use crate::types::TimestampRangeType;
|
||||
use crate::types::TimestampType;
|
||||
use crate::types::TodoKeywordType;
|
||||
use crate::types::Underline;
|
||||
@@ -2137,6 +2138,19 @@ fn compare_timestamp<'b, 's>(
|
||||
}
|
||||
}
|
||||
|
||||
let range_type = get_property_unquoted_atom(emacs, ":range-type")?;
|
||||
match (range_type, &rust.range_type) {
|
||||
(Some("daterange"), TimestampRangeType::DateRange) => {}
|
||||
(None, TimestampRangeType::None) => {}
|
||||
_ => {
|
||||
this_status = DiffStatus::Bad;
|
||||
message = Some(format!(
|
||||
"Range type mismatch (emacs != rust) {:?} != {:?}",
|
||||
range_type, rust.range_type
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Compare :type :range-type :raw-value :year-start :month-start :day-start :hour-start :minute-start :year-end :month-end :day-end :hour-end :minute-end :repeater-type :repeater-value :repeater-unit :warning-type :warning-value :warning-unit
|
||||
//
|
||||
// :type unquoted atom either diary, active, inactive, active-range, or inactive-range.
|
||||
|
||||
Reference in New Issue
Block a user