Skip to content

Commit 7151529

Browse files
committed
rustbook: Fixes display of navigation links in README.html.
1 parent 2214860 commit 7151529

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rustbook/javascript.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ document.addEventListener("DOMContentLoaded", function(event) {
5252
}
5353
5454
for (var i = 0; i < toc.length; i++) {
55-
if (toc[i].attributes['href'].value === href) {
55+
if (toc[i].attributes['href'].value.split('/').pop() === href) {
5656
var nav = document.createElement('p');
5757
if (i > 0) {
5858
var prevNode = toc[i-1].cloneNode(true);

0 commit comments

Comments
 (0)