about summary refs log tree commit diff
path: root/src/librustdoc
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-06-01 10:17:30 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-06-01 21:53:43 -0700
commit0dbfa5f6110d96ea26f124b6dc8487e1bec3da8a (patch)
tree81ac467b2261814fbc7e7c8abf27818b75abd026 /src/librustdoc
parentc605c2b57b412402e6b491e91852fd9dbadeb551 (diff)
downloadrust-0dbfa5f6110d96ea26f124b6dc8487e1bec3da8a.tar.gz
rust-0dbfa5f6110d96ea26f124b6dc8487e1bec3da8a.zip
rustdoc: Fix some more broken links
Diffstat (limited to 'src/librustdoc')
-rw-r--r--src/librustdoc/html/static/main.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js
index 6c9bc793582..440b829c80c 100644
--- a/src/librustdoc/html/static/main.js
+++ b/src/librustdoc/html/static/main.js
@@ -664,7 +664,10 @@
             for (var j = 0; j < structs.length; j++) {
                 var code = $('<code>').append(structs[j]);
                 $.each(code.find('a'), function(idx, a) {
-                    $(a).attr('href', rootPath + $(a).attr('href'));
+                    var href = $(a).attr('href');
+                    if (!href.startsWith('http')) {
+                        $(a).attr('href', rootPath + $(a).attr('href'));
+                    }
                 });
                 var li = $('<li>').append(code);
                 list.append(li);