Allow :: to end links regardless of parenthesis.
This commit is contained in:
@@ -3002,10 +3002,55 @@ fn compare_angle_link<'b, 's>(
|
||||
emacs: &'b Token<'s>,
|
||||
rust: &'b AngleLink<'s>,
|
||||
) -> Result<DiffEntry<'b, 's>, Box<dyn std::error::Error>> {
|
||||
let this_status = DiffStatus::Good;
|
||||
let message = None;
|
||||
let mut this_status = DiffStatus::Good;
|
||||
let mut message = None;
|
||||
|
||||
// TODO: Compare :type :path :format :raw-link :application :search-option
|
||||
if let Some((new_status, new_message)) = compare_properties!(
|
||||
emacs,
|
||||
rust,
|
||||
(
|
||||
EmacsField::Required(":type"),
|
||||
|r| {
|
||||
match &r.link_type {
|
||||
LinkType::File => Some(Cow::Borrowed("file")),
|
||||
LinkType::Protocol(protocol) => Some(protocol.clone()),
|
||||
LinkType::Id => Some(Cow::Borrowed("id")),
|
||||
LinkType::CustomId => Some(Cow::Borrowed("custom-id")),
|
||||
LinkType::CodeRef => Some(Cow::Borrowed("coderef")),
|
||||
LinkType::Fuzzy => Some(Cow::Borrowed("fuzzy")),
|
||||
}
|
||||
},
|
||||
compare_property_quoted_string
|
||||
),
|
||||
(
|
||||
EmacsField::Required(":path"),
|
||||
|r| Some(r.path),
|
||||
compare_property_quoted_string
|
||||
),
|
||||
(
|
||||
EmacsField::Required(":format"),
|
||||
|_| Some("plain"),
|
||||
compare_property_unquoted_atom
|
||||
),
|
||||
(
|
||||
EmacsField::Required(":raw-link"),
|
||||
|r| Some(r.raw_link),
|
||||
compare_property_quoted_string
|
||||
),
|
||||
(
|
||||
EmacsField::Required(":application"),
|
||||
|r| r.application,
|
||||
compare_property_quoted_string
|
||||
),
|
||||
(
|
||||
EmacsField::Required(":search-option"),
|
||||
|r| r.search_option,
|
||||
compare_property_quoted_string
|
||||
)
|
||||
)? {
|
||||
this_status = new_status;
|
||||
message = new_message;
|
||||
}
|
||||
|
||||
Ok(DiffResult {
|
||||
status: this_status,
|
||||
|
||||
Reference in New Issue
Block a user