mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
condense matches on autolink
This commit is contained in:
parent
b7e3f525bd
commit
96ff235770
1 changed files with 2 additions and 2 deletions
|
@ -385,7 +385,7 @@ fn map_links<'e>(
|
|||
let (link_type, link_target_s, link_name) =
|
||||
callback(&end_link_target.take().unwrap(), &s);
|
||||
end_link_target = Some(CowStr::Boxed(link_target_s.into()));
|
||||
if !matches!(end_link_type, Some(link) if link == LinkType::Autolink) {
|
||||
if !matches!(end_link_type, Some(LinkType::Autolink)) {
|
||||
end_link_type = link_type;
|
||||
}
|
||||
Event::Text(CowStr::Boxed(link_name.into()))
|
||||
|
@ -394,7 +394,7 @@ fn map_links<'e>(
|
|||
let (link_type, link_target_s, link_name) =
|
||||
callback(&end_link_target.take().unwrap(), &s);
|
||||
end_link_target = Some(CowStr::Boxed(link_target_s.into()));
|
||||
if !matches!(end_link_type, Some(link) if link == LinkType::Autolink) {
|
||||
if !matches!(end_link_type, Some(LinkType::Autolink)) {
|
||||
end_link_type = link_type;
|
||||
}
|
||||
Event::Code(CowStr::Boxed(link_name.into()))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue