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(
944944 // certain link kinds cannot have their path be urls,
945945 // so they should not be ignored, no matter how much they look like urls.
946946 // 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+ ) ;
950951
951952 // [] is mostly likely not supposed to be a link
952953 if ori_link. link . is_empty ( ) {
@@ -996,7 +997,7 @@ fn preprocess_link(
996997 }
997998 } ;
998999
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.
10001001 // This is to prevent churn by linting on stuff that isn't meant to be a link.
10011002 // only shortcut links have simple enough syntax that they
10021003 // are likely to be written accidentlly, collapsed and reference links
You can’t perform that action at this time.
0 commit comments