diff --git a/.themes/classic/source/javascripts/octopress.js b/.themes/classic/source/javascripts/octopress.js index 9e4f042..2bba4c0 100644 --- a/.themes/classic/source/javascripts/octopress.js +++ b/.themes/classic/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); }); } diff --git a/plugins/backtick_code_block.rb b/plugins/backtick_code_block.rb index c4581bf..8da510e 100644 --- a/plugins/backtick_code_block.rb +++ b/plugins/backtick_code_block.rb @@ -24,7 +24,7 @@ module BacktickCodeBlock if markup =~ AllOptions highlight(code, $1, {caption: $2, url: $3, anchor: $4 || 'Link', linenos: linenos, start: start, marks: marks}) elsif markup =~ LangCaption - highlight(code, $1, {caption: $2 || '', linenos: linenos, start: start, marks: marks}) + highlight(code, $1, {caption: $2 || nil, linenos: linenos, start: start, marks: marks}) else highlight(code, 'plain', {linenos: linenos, start: start}) end