2016-08-24 12:49:21 +05:30
|
|
|
module Hamlit
|
|
|
|
class TemplateHandler
|
|
|
|
def call(template)
|
|
|
|
Engine.new(
|
|
|
|
generator: Temple::Generators::RailsOutputBuffer,
|
2017-09-10 17:25:29 +05:30
|
|
|
attr_quote: '"'
|
2016-08-24 12:49:21 +05:30
|
|
|
).call(template.source)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
ActionView::Template.register_template_handler(
|
|
|
|
:haml,
|
2017-09-10 17:25:29 +05:30
|
|
|
Hamlit::TemplateHandler.new
|
2016-08-24 12:49:21 +05:30
|
|
|
)
|
|
|
|
|
|
|
|
Hamlit::Filters.remove_filter('coffee')
|
|
|
|
Hamlit::Filters.remove_filter('coffeescript')
|