Skip to content

Commit

Permalink
Rollup merge of rust-lang#42080 - pravic:jquery-removal-fix, r=frewsxcv
Browse files Browse the repository at this point in the history
Fix regression introduced by jQuery removal

Fixes rust-lang#42078.
Follows rust-lang#41307.

r? @steveklabnik
cc @frewsxcv
  • Loading branch information
Mark-Simulacrum committed May 19, 2017
2 parents 4c2273a + 1eb6639 commit f3b7b61
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/librustdoc/html/static/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,14 +215,14 @@
} else if (ev.target.tagName === 'SPAN' && hasClass(ev.target.parentNode, 'line-numbers')) {
var prev_id = 0;

function set_fragment(name) {
var set_fragment = function (name) {
if (browserSupportsHistoryApi()) {
history.replaceState(null, null, '#' + name);
window.hashchange();
} else {
location.replace('#' + name);
}
}
};

var cur_id = parseInt(ev.target.id, 10);

Expand Down Expand Up @@ -685,7 +685,7 @@
}

function escape(content) {
let h1 = document.createElement('h1');
var h1 = document.createElement('h1');
h1.textContent = content;
return h1.innerHTML;
}
Expand Down

0 comments on commit f3b7b61

Please sign in to comment.