Browse Source

code_block and inlcude_code no longer needlessly render through the Liquid template parser

unreleased_contents
Brandon Mathis 13 years ago
parent
commit
6009daa8a2
  1. 4
      plugins/code_block.rb
  2. 4
      plugins/include_code.rb

4
plugins/code_block.rb

@ -84,10 +84,6 @@ module Jekyll
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)
end
end
end
end

4
plugins/include_code.rb

@ -59,10 +59,6 @@ module Jekyll
url = "#{context.registers[:site].config['url']}/#{code_dir}/#{@file}"
source = "<div><figure role=code><figcaption><span>#{title}</span> <a href='#{url}'>download</a></figcaption>\n"
source += " #{highlight(code, @filetype)}</figure></div>"
partial = Liquid::Template.parse(source)
context.stack do
partial.render(context)
end
end
end
end

Loading…
Cancel
Save