mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-02-21 05:23:42 +01:00
Fix error in ToC script at the bottom of the page (#2002)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
This commit is contained in:
parent
0ce83512fc
commit
0657cc1848
|
|
@ -107,6 +107,11 @@ function getCurrentHeading(headings, headerOffset) {
|
||||||
index += 1;
|
index += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// At the bottom of the page we might not have a heading.
|
||||||
|
if (!currentHeading) {
|
||||||
|
currentHeading = prevHeading;
|
||||||
|
}
|
||||||
|
|
||||||
return currentHeading;
|
return currentHeading;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
1
changelogs/internal/newsfragments/2002.clarification
Normal file
1
changelogs/internal/newsfragments/2002.clarification
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Improve the JS script to highlight the current ToC entry.
|
||||||
Loading…
Reference in a new issue