class CodeRay::Encoders::HTML::Output::Template

def self.wrap! str, template, target

def self.wrap! str, template, target
  target = Regexp.new(Regexp.escape("<%#{target}%>"))
  if template =~ target
    str[0,0] = $`
    str << $'
  else
    raise "Template target <%%%p%%> not found" % target
  end
end