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

Version Path
middleman-core-4.1.0.rc.1 lib/middleman-core/renderers/erb.rb
middleman-core-4.0.0 lib/middleman-core/renderers/erb.rb
middleman-core-4.0.0.rc.3 lib/middleman-core/renderers/erb.rb
middleman-core-4.0.0.rc.2 lib/middleman-core/renderers/erb.rb
middleman-core-4.0.0.rc.1 lib/middleman-core/renderers/erb.rb
middleman-core-4.0.0.beta.2 lib/middleman-core/renderers/erb.rb
middleman-core-4.0.0.beta.1 lib/middleman-core/renderers/erb.rb
middleman-core-4.0.0.alpha.6 lib/middleman-core/renderers/erb.rb
middleman-core-4.0.0.alpha.5 lib/middleman-core/renderers/erb.rb
middleman-core-4.0.0.alpha.4 lib/middleman-core/renderers/erb.rb
middleman-core-4.0.0.alpha.3 lib/middleman-core/renderers/erb.rb
middleman-core-4.0.0.alpha.2 lib/middleman-core/renderers/erb.rb