diff --git a/source/javascripts/octopress.js b/source/javascripts/octopress.js index 9e4f042..2bba4c0 100644 --- a/source/javascripts/octopress.js +++ b/source/javascripts/octopress.js @@ -40,17 +40,17 @@ function addSidebarToggler() { function addCodeLineNumbers() { if (navigator.appName === 'Microsoft Internet Explorer') { return; } - $('div.gist-highlight').each(function(code) { + $('div.gist-highlight').each(function(index) { var tableStart = '
', lineNumbers = '
',
         tableMiddle = '
', tableEnd = '
', - count = $('.line', code).length; + count = $('.line', this).length; for (var i=1;i<=count; i++) { lineNumbers += ''+i+'\n'; } - var table = tableStart + lineNumbers + tableMiddle + '
'+$('pre', code).html()+'
' + tableEnd; - $(code).html(table); + var table = tableStart + lineNumbers + tableMiddle + '
'+$('pre', this).html()+'
' + tableEnd; + $(this).html(table); }); }