From 7b81aab5ac225fb12a100d9eb463340f322704fd Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Tue, 26 Jul 2011 23:36:42 -0400 Subject: added support for pygments.rb removing dependency on pygments, added support for caching highlighted code from pygments.rb and added default line numbering. Javascript auto line numbering now only occurs for embedded gists --- .themes/classic/source/javascripts/octopress.js | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to '.themes') diff --git a/.themes/classic/source/javascripts/octopress.js b/.themes/classic/source/javascripts/octopress.js index 12ca23ea..5266ecb3 100644 --- a/.themes/classic/source/javascripts/octopress.js +++ b/.themes/classic/source/javascripts/octopress.js @@ -48,8 +48,7 @@ function testFeatures() { function addCodeLineNumbers(){ if (navigator.appName == 'Microsoft Internet Explorer') { return } - $('div.highlight pre code').each(function(el){ addDivLines(el); }); - $('div.highlight, div.gist-highlight').each(function(code){ + $('div.gist-highlight').each(function(code){ var tableStart = '
'; var lineNumbers = '
';
     var tableMiddle = '
'; @@ -62,16 +61,6 @@ function addCodeLineNumbers(){ $(code).html(table); }); } -function addDivLines(el){ - var content = $(el).html(); - var lines = content.replace(/\s*$/g, '').split(/\n/); - var count = lines.length; - $(lines).each(function(line, index){ - if(line == '') line = ' '; - lines[index] = '
' + line + '
'; - }); - $(el).html(lines.join('')); -} function flashVideoFallback(){ var flashplayerlocation = "/assets/jwplayer/player.swf", -- cgit v1.2.1