aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorBrandon Mathis <brandon@imathis.com>2011-07-28 07:18:45 -0700
committerBrandon Mathis <brandon@imathis.com>2011-07-28 07:18:45 -0700
commitb37ce3a8ae9c1f53f27fc936656176cf2c755362 (patch)
treee9dec1bee8f39c1665bd6a6643fea5fde14ce513 /plugins
parent4a2254665cadf5d936071e37c8c561456ce1d449 (diff)
parent2d8a17cd4120f64348ced3a14b1e911e11bf88ef (diff)
downloadmy_new_personal_website-b37ce3a8ae9c1f53f27fc936656176cf2c755362.tar.xz
my_new_personal_website-b37ce3a8ae9c1f53f27fc936656176cf2c755362.zip
Merge pull request #53 from zumda/master
Code blocks didn't work with textile
Diffstat (limited to '')
-rw-r--r--plugins/code_block.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/code_block.rb b/plugins/code_block.rb
index af64e031..cdb12307 100644
--- a/plugins/code_block.rb
+++ b/plugins/code_block.rb
@@ -75,6 +75,7 @@ module Jekyll
code = super.join
source = "<div><figure role=code>"
source += @caption if @caption
+ source = context['pygments_prefix'] + source if context['pygments_prefix']
if @filetype
@filetype = 'objc' if @filetype == 'm'
@filetype = 'perl' if @filetype == 'pl'
@@ -82,6 +83,7 @@ module Jekyll
else
source += "<pre><code>" + code.lstrip.rstrip.gsub(/</,'&lt;') + "</code></pre></figure></div>"
end
+ source = source + context['pygments_suffix'] if context['pygments_suffix']
partial = Liquid::Template.parse(source)
context.stack do
partial.render(context)