Skip to content

Commit 4046ac4

Browse files
committed
Make sure anchor linking jumps to correct location
1 parent e80f4fb commit 4046ac4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

doc-tool/resources/_layouts/main.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@
5454
$('pre code').each(function(i, block) {
5555
hljs.highlightBlock(block);
5656
});
57+
58+
if (window.location.hash.length > 0) {
59+
window.scrollTo(0, $(window.location.hash).offset().top - 90);
60+
}
5761
});
5862
</script>
5963
</body>

0 commit comments

Comments
 (0)