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.5.1 lib/middleman-core/renderers/erb.rb
middleman-core-4.5.0 lib/middleman-core/renderers/erb.rb
middleman-core-4.4.3 lib/middleman-core/renderers/erb.rb
middleman-core-4.4.2 lib/middleman-core/renderers/erb.rb
middleman-core-4.4.0 lib/middleman-core/renderers/erb.rb
middleman-core-4.3.11 lib/middleman-core/renderers/erb.rb
middleman-core-4.3.10 lib/middleman-core/renderers/erb.rb
middleman-core-4.3.8 lib/middleman-core/renderers/erb.rb
middleman-core-4.3.7 lib/middleman-core/renderers/erb.rb
files.com-1.0.55 docs/vendor/bundle/ruby/2.5.0/gems/middleman-core-4.3.3/lib/middleman-core/renderers/erb.rb
middleman-core-4.3.6 lib/middleman-core/renderers/erb.rb
middleman-core-4.3.5 lib/middleman-core/renderers/erb.rb
middleman-core-4.3.4 lib/middleman-core/renderers/erb.rb
middleman-core-4.3.3 lib/middleman-core/renderers/erb.rb
middleman-core-4.3.2 lib/middleman-core/renderers/erb.rb
middleman-core-4.3.1 lib/middleman-core/renderers/erb.rb
middleman-core-4.3.0 lib/middleman-core/renderers/erb.rb
middleman-core-4.3.0.rc.4 lib/middleman-core/renderers/erb.rb
middleman-core-4.3.0.rc.3 lib/middleman-core/renderers/erb.rb
middleman-core-4.3.0.rc.2 lib/middleman-core/renderers/erb.rb