1
Fork 0

rustdoc: Fix some more broken links

This commit is contained in:
Alex Crichton 2014-06-01 10:17:30 -07:00
parent c605c2b57b
commit 0dbfa5f611
3 changed files with 31 additions and 5 deletions

View file

@ -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);