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 4b9b410 commit ded2ec9Copy full SHA for ded2ec9
root/static/js/syntaxhighlighter.js
@@ -163,6 +163,19 @@ $(function () {
163
var el = $(res[1]);
164
$('html, body').scrollTop(el.offset().top);
165
}
166
+
167
+ $(window).on('hashchange', function() {
168
+ var lineMatch;
169
+ if (lineMatch = document.location.hash.match(/^#L(\d+(-\d+)?(,\d+(-\d+)?)*)$/) ) {
170
+ source.attr('data-line', lineMatch[1]);
171
+ var selector = $.map(
172
+ parseLines(lineMatch[1]),
173
+ function (e, i) { return '.number' + e }
174
+ ).join(', ');
175
+ source.find('.highlighted').removeClass('highlighted');
176
+ source.find('.syntaxhighlighter .line').filter(selector).addClass('highlighted');
177
+ }
178
+ });
179
180
});
181
0 commit comments