We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 023c37f commit 9011ed6Copy full SHA for 9011ed6
root/source.html
@@ -71,7 +71,4 @@
71
<% IF module.sloc > 0 %>
72
togglePod();
73
<% END %>
74
-if(document.location.hash)
75
- document.location.href = document.location.href;
76
-});
77
</script>
root/static/js/syntaxhighlighter.js
@@ -156,6 +156,12 @@ $(function () {
156
$(el).contents().wrap('<a href="#'+id+'" id="'+id+'"></a>');
157
}
158
});
159
+
160
+ var res;
161
+ if (res = document.location.hash.match(/^(#L\d+)(-|,|$)/)) {
162
+ var el = $(res[1]);
163
+ $('html, body').scrollTop(el.offset().top);
164
+ }
165
166
167
0 commit comments