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 @@ -934,9 +934,10 @@ fn preprocess_link(
934
934
// certain link kinds cannot have their path be urls,
935
935
// so they should not be ignored, no matter how much they look like urls.
936
936
// e.g. [https://example.com/] is not a link to example.com.
937
- let can_be_url = ori_link. kind != LinkType :: ShortcutUnknown
938
- && ori_link. kind != LinkType :: CollapsedUnknown
939
- && ori_link. kind != LinkType :: ReferenceUnknown ;
937
+ let can_be_url = !matches ! (
938
+ ori_link. kind,
939
+ LinkType :: ShortcutUnknown | LinkType :: CollapsedUnknown | LinkType :: ReferenceUnknown
940
+ ) ;
940
941
941
942
// [] is mostly likely not supposed to be a link
942
943
if ori_link. link . is_empty ( ) {
@@ -986,7 +987,7 @@ fn preprocess_link(
986
987
}
987
988
} ;
988
989
989
- // If there's no backticks, be lenient revert to old behavior.
990
+ // If there's no backticks, be lenient and revert to the old behavior.
990
991
// This is to prevent churn by linting on stuff that isn't meant to be a link.
991
992
// only shortcut links have simple enough syntax that they
992
993
// are likely to be written accidentlly, collapsed and reference links
You can’t perform that action at this time.
0 commit comments