2016-04-11 17:27:07 -04:00
|
|
|
module Hamlit
|
|
|
|
class TemplateHandler
|
|
|
|
def call(template)
|
|
|
|
Engine.new(
|
|
|
|
generator: Temple::Generators::RailsOutputBuffer,
|
2017-05-03 07:27:17 -04:00
|
|
|
attr_quote: '"'
|
2016-04-11 17:27:07 -04:00
|
|
|
).call(template.source)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
ActionView::Template.register_template_handler(
|
|
|
|
:haml,
|
2017-05-03 07:27:17 -04:00
|
|
|
Hamlit::TemplateHandler.new
|
2016-04-11 17:27:07 -04:00
|
|
|
)
|
2016-06-23 11:21:35 -04:00
|
|
|
|
|
|
|
Hamlit::Filters.remove_filter('coffee')
|
|
|
|
Hamlit::Filters.remove_filter('coffeescript')
|