Skip to content

Commit 191e5b0

Browse files
committed
Exit early for non-linky things
1 parent 4f10f67 commit 191e5b0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/librustdoc/clean/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -854,6 +854,13 @@ impl Clean<Attributes> for [ast::Attribute] {
854854
link.trim()
855855
};
856856

857+
// avoid resolving things (i.e. regular links) which aren't like paths
858+
// FIXME(Manishearth) given that most links have slashes in them might be worth
859+
// doing a check for slashes first
860+
if path_str.contains(|ch: char| !(ch.is_alphanumeric() || ch == ':' || ch == '_')) {
861+
continue;
862+
}
863+
857864
let resolve = |is_val| {
858865
// In case we're in a module, try to resolve the relative
859866
// path

0 commit comments

Comments
 (0)