Class: Tilt::HamlTemplate

Inherits:
Object
  • Object
show all
Defined in:
lib/awestruct/handlers/tilt_handler.rb

Overview

As of Haml 4.0.0, Textile is no longer registered by default Monkeypatch the Tilt templates to force Textile to be registered

Instance Method Summary collapse

Instance Method Details

#initialize_engineObject



68
69
70
71
72
73
# File 'lib/awestruct/handlers/tilt_handler.rb', line 68

def initialize_engine
  require_template_library 'haml'
  if Haml::VERSION >= '4.0.0' && !Haml::Filters.constants.include?('Textile')
    Haml::Filters.register_tilt_filter 'Textile'
  end
end