rustdoc: Fix implementors list javascript
* Use a different loop variable, `i` was already taken. This caused
missing items in the implementors list.
* Use `.getAttribute('href')` rather than `.href` to get the relative
URL which is what it needs to actually fix the links.
This commit is contained in:
@@ -1083,10 +1083,10 @@
|
||||
code.innerHTML = structs[j];
|
||||
|
||||
var x = code.getElementsByTagName('a');
|
||||
for (var i = 0; i < x.length; i++) {
|
||||
var href = x[i].href;
|
||||
for (var k = 0; k < x.length; k++) {
|
||||
var href = x[k].getAttribute('href');
|
||||
if (href && href.indexOf('http') !== 0) {
|
||||
x[i].href = rootPath + href;
|
||||
x[k].setAttribute('href', rootPath + href);
|
||||
}
|
||||
}
|
||||
var li = document.createElement('li');
|
||||
|
||||
Reference in New Issue
Block a user