From 2d8a17cd4120f64348ced3a14b1e911e11bf88ef Mon Sep 17 00:00:00 2001 From: Andreas Arnold Date: Thu, 28 Jul 2011 16:02:49 +0200 Subject: making textile and code blocks work nice together --- plugins/code_block.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'plugins/code_block.rb') 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 = "
" 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 += "
" + code.lstrip.rstrip.gsub(/
" end + source = source + context['pygments_suffix'] if context['pygments_suffix'] partial = Liquid::Template.parse(source) context.stack do partial.render(context) -- cgit v1.2.1