rustdoc: Get [src] links working for inlined dox
These links work by hyperlinking back to the actual documentation page with a query parameter which will be recognized and then auto-click the appropriate [src] link.
This commit is contained in:
parent
9f13db2cb2
commit
8dad7f579e
3 changed files with 96 additions and 32 deletions
|
@ -675,4 +675,14 @@
|
|||
if (window.pending_implementors) {
|
||||
window.register_implementors(window.pending_implementors);
|
||||
}
|
||||
|
||||
|
||||
var query = window.location.search.substring(1);
|
||||
var vars = query.split('&');
|
||||
for (var i = 0; i < vars.length; i++) {
|
||||
var pair = vars[i].split('=');
|
||||
if (pair[0] == 'gotosrc') {
|
||||
window.location = $('#src-' + pair[1]).attr('href');
|
||||
}
|
||||
}
|
||||
}());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue