Merge pull request #53 from zumda/master

Code blocks didn't work with textile
This commit is contained in:
Brandon Mathis 2011-07-28 07:18:45 -07:00
commit b37ce3a8ae

View File

@ -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)