hamlit.rb 386 Bytes
Newer Older
connorshea's avatar
connorshea committed
1 2 3 4 5
module Hamlit
  class TemplateHandler
    def call(template)
      Engine.new(
        generator: Temple::Generators::RailsOutputBuffer,
6
        attr_quote: '"'
connorshea's avatar
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's avatar
connorshea committed
15
)
16 17 18

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