diff --git a/lib/octopress-codefence.rb b/lib/octopress-codefence.rb index 2a8e814..21ecdf8 100644 --- a/lib/octopress-codefence.rb +++ b/lib/octopress-codefence.rb @@ -5,7 +5,7 @@ module Octopress module Codefence Jekyll::Hooks.register [:posts, :pages, :documents], :pre_render do |item, payload| if item.respond_to?(:ext) - ext = item.ext + ext = item.data['ext'] else ext = nil end @@ -17,7 +17,7 @@ class Highlighter LangCaption = /([^\s]+)\s*(.+)?/i def initialize(input, ext=nil, aliases=nil) - @input = input + @input = input.dup @ext = ext @aliases = aliases end