BigW Consortium Gitlab

hamlit.rb 386 Bytes
Newer Older
connorshea committed
1 2 3 4 5
module Hamlit
  class TemplateHandler
    def call(template)
      Engine.new(
        generator: Temple::Generators::RailsOutputBuffer,
6
        attr_quote: '"'
connorshea committed
7 8 9 10 11 12 13
      ).call(template.source)
    end
  end
end

ActionView::Template.register_template_handler(
  :haml,
14
  Hamlit::TemplateHandler.new
connorshea committed
15
)
16 17 18

Hamlit::Filters.remove_filter('coffee')
Hamlit::Filters.remove_filter('coffeescript')