File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -944,9 +944,10 @@ fn preprocess_link(
944
944
// certain link kinds cannot have their path be urls,
945
945
// so they should not be ignored, no matter how much they look like urls.
946
946
// e.g. [https://example.com/] is not a link to example.com.
947
- let can_be_url = ori_link. kind != LinkType :: ShortcutUnknown
948
- && ori_link. kind != LinkType :: CollapsedUnknown
949
- && ori_link. kind != LinkType :: ReferenceUnknown ;
947
+ let can_be_url = !matches ! (
948
+ ori_link. kind,
949
+ LinkType :: ShortcutUnknown | LinkType :: CollapsedUnknown | LinkType :: ReferenceUnknown
950
+ ) ;
950
951
951
952
// [] is mostly likely not supposed to be a link
952
953
if ori_link. link . is_empty ( ) {
@@ -996,7 +997,7 @@ fn preprocess_link(
996
997
}
997
998
} ;
998
999
999
- // If there's no backticks, be lenient revert to old behavior.
1000
+ // If there's no backticks, be lenient and revert to the old behavior.
1000
1001
// This is to prevent churn by linting on stuff that isn't meant to be a link.
1001
1002
// only shortcut links have simple enough syntax that they
1002
1003
// are likely to be written accidentlly, collapsed and reference links
You can’t perform that action at this time.
0 commit comments