Sha256: c62cd391d1accc67daa2f7e95dcee9f87f124b16a1a6c6c09433ceb2d40fb89d
Contents?: true
Size: 578 Bytes
Versions: 52
Compression:
Stored size: 578 Bytes
Contents
# ERb renderer module Middleman module Renderers class ERb < ::Middleman::Extension def after_configuration ::Tilt.prefer(Template, :erb) end class Template < ::Tilt::ErubisTemplate ## # In preamble we need a flag `__in_erb_template` and SafeBuffer for padrino apps. # def precompiled_preamble(locals) original = super "__in_erb_template = true\n" << original # .rpartition("\n").first << "#{@outvar} = _buf = ActiveSupport::SafeBuffer.new\n" end end end end end
Version data entries
52 entries across 52 versions & 3 rubygems