]> git.lizzy.rs Git - rust.git/blobdiff - src/librustdoc/html/static/main.js
auto merge of #14874 : pcwalton/rust/enum-to-float-casts-part-deux, r=alexcrichton
[rust.git] / src / librustdoc / html / static / main.js
index 6c9bc793582b66cb23921dc5e7738a60625fcd47..697199e9abf5a34fca3ca8bcb964cb526c31b4f6 100644 (file)
                 }
                 div.append($('<a>', {'href': '../' + crates[i] + '/index.html',
                                     'class': klass}).text(crates[i]));
-                div.append($('<br>'));
             }
             sidebar.append(div);
         }
             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);
         window.register_implementors(window.pending_implementors);
     }
 
-    // See documentaiton in html/render.rs for what this is doing.
+    // See documentation in html/render.rs for what this is doing.
     var query = getQueryStringParams();
     if (query['gotosrc']) {
         window.location = $('#src-' + query['gotosrc']).attr('href');