diff options
author | Brandon Mathis <brandon@imathis.com> | 2011-07-26 23:36:42 -0400 |
---|---|---|
committer | Brandon Mathis <brandon@imathis.com> | 2011-07-26 23:36:42 -0400 |
commit | 7b81aab5ac225fb12a100d9eb463340f322704fd (patch) | |
tree | f46adc303a4f5b4510d8880c8d5820173c931414 /.themes/classic | |
parent | 727a1492278c5e22aa68019f14d4e60319476f74 (diff) | |
download | my_new_personal_website-7b81aab5ac225fb12a100d9eb463340f322704fd.tar.xz my_new_personal_website-7b81aab5ac225fb12a100d9eb463340f322704fd.zip |
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
Diffstat (limited to '')
-rw-r--r-- | .themes/classic/source/javascripts/octopress.js | 13 |
1 files changed, 1 insertions, 12 deletions
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 = '<table cellpadding="0" cellspacing="0"><tbody><tr><td class="gutter">'; var lineNumbers = '<pre class="line-numbers">'; var tableMiddle = '</pre></td><td class="code" width="100%">'; @@ -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] = '<div class="line">' + line + '</div>'; - }); - $(el).html(lines.join('')); -} function flashVideoFallback(){ var flashplayerlocation = "/assets/jwplayer/player.swf", |