We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3cbd848 commit e13b9d6Copy full SHA for e13b9d6
root/static/js/syntaxhighlighter.js
@@ -162,6 +162,19 @@ $(function () {
162
var el = $(res[1]);
163
$('html, body').scrollTop(el.offset().top);
164
}
165
+
166
+ $(window).on('hashchange', function() {
167
+ var lineMatch;
168
+ if (lineMatch = document.location.hash.match(/^#L(\d+(-\d+)?(,\d+(-\d+)?)*)$/) ) {
169
+ source.attr('data-line', lineMatch[1]);
170
+ var selector = $.map(
171
+ parseLines(lineMatch[1]),
172
+ function (e, i) { return '.number' + e }
173
+ ).join(', ');
174
+ source.find('.highlighted').removeClass('highlighted');
175
+ source.find('.syntaxhighlighter .line').filter(selector).addClass('highlighted');
176
+ }
177
+ });
178
179
});
180
0 commit comments