Sha256: 7eb70c48f849189e2066b19b5f58913ac66d40e8a938eb7ca5000d1933378b74

Contents?: true

Size: 575 Bytes

Versions: 23

Compression:

Stored size: 575 Bytes

Contents

module Plate
  # Mostly lifted from the default SassTemplate class at 
  # https://github.com/rtomayko/tilt/blob/master/lib/tilt/haml.rb
  #
  # Modifications have been made to default to html5 style
  class HamlTemplate < Tilt::HamlTemplate
    def prepare
      options = @options.merge(:filename => eval_file, :line => line)
      @engine = ::Haml::Engine.new(data, haml_options)
    end

    private
      def haml_options
        # Default style to html5 and double quoted attributes    
        options.merge(:format => :html5, :attr_wrapper => '"')
      end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
plate-0.7.8 lib/plate/haml_template.rb
plate-0.7.7 lib/plate/haml_template.rb
plate-0.7.6 lib/plate/haml_template.rb
plate-0.7.5 lib/plate/haml_template.rb
plate-0.7.4 lib/plate/haml_template.rb
plate-0.7.3 lib/plate/haml_template.rb
plate-0.7.2 lib/plate/haml_template.rb
plate-0.7.1 lib/plate/haml_template.rb
plate-0.7.0 lib/plate/haml_template.rb
plate-0.7.0.pre5 lib/plate/haml_template.rb
plate-0.7.0.pre4 lib/plate/haml_template.rb
plate-0.7.0.pre3 lib/plate/haml_template.rb
plate-0.7.0.pre2 lib/plate/haml_template.rb
plate-0.7.0.pre lib/plate/haml_template.rb
plate-0.6.3 lib/plate/haml_template.rb
plate-0.6.2 lib/plate/haml_template.rb
plate-0.6.1 lib/plate/haml_template.rb
plate-0.6.0 lib/plate/haml_template.rb
plate-0.5.4 lib/plate/haml_template.rb
plate-0.5.3 lib/plate/haml_template.rb