From 76b9e3f19a65ed648a8878c2eed93e32d6d81e5f Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Tue, 5 Jun 2012 00:35:43 -0500 Subject: [PATCH] updated octopress.js to get new gist line number fix --- source/javascripts/octopress.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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); }); }