|
|
@ -75,6 +75,7 @@ module Jekyll
|
|
|
|
code = super.join
|
|
|
|
code = super.join
|
|
|
|
source = "<div><figure role=code>"
|
|
|
|
source = "<div><figure role=code>"
|
|
|
|
source += @caption if @caption
|
|
|
|
source += @caption if @caption
|
|
|
|
|
|
|
|
source = context['pygments_prefix'] + source if context['pygments_prefix']
|
|
|
|
if @filetype
|
|
|
|
if @filetype
|
|
|
|
@filetype = 'objc' if @filetype == 'm'
|
|
|
|
@filetype = 'objc' if @filetype == 'm'
|
|
|
|
@filetype = 'perl' if @filetype == 'pl'
|
|
|
|
@filetype = 'perl' if @filetype == 'pl'
|
|
|
@ -82,6 +83,7 @@ module Jekyll
|
|
|
|
else
|
|
|
|
else
|
|
|
|
source += "<pre><code>" + code.lstrip.rstrip.gsub(/</,'<') + "</code></pre></figure></div>"
|
|
|
|
source += "<pre><code>" + code.lstrip.rstrip.gsub(/</,'<') + "</code></pre></figure></div>"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
source = source + context['pygments_suffix'] if context['pygments_suffix']
|
|
|
|
partial = Liquid::Template.parse(source)
|
|
|
|
partial = Liquid::Template.parse(source)
|
|
|
|
context.stack do
|
|
|
|
context.stack do
|
|
|
|
partial.render(context)
|
|
|
|
partial.render(context)
|
|
|
|