Sha256: f687fa23a80766883fe3b94f1e11242a024b26a75928f70d0868a9cdb0e6c402

Contents?: true

Size: 519 Bytes

Versions: 15

Compression:

Stored size: 519 Bytes

Contents

=begin
haml is great for building galakei sites, as it enforces well formed markup. galakei takes care of setting the haml template format for you, so you'll generate xhtml.
=end
class Galakei::Filter::Haml < Galakei::Filter::Base
  # :stopdoc:
  def filter
    old_format = ::Haml::Template.options[:format]
    Rails.logger.debug("[galakei] galakei detected, switching HAML to use :xhtml")
    ::Haml::Template.options[:format] = :xhtml
    yield
  ensure
    ::Haml::Template.options[:format] = old_format
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
galakei-0.15.2 lib/galakei/filter/haml.rb
galakei-0.15.1 lib/galakei/filter/haml.rb
galakei-0.15.0 lib/galakei/filter/haml.rb
galakei-0.14.4 lib/galakei/filter/haml.rb
galakei-0.14.3 lib/galakei/filter/haml.rb
galakei-0.14.2 lib/galakei/filter/haml.rb
galakei-0.14.1 lib/galakei/filter/haml.rb
galakei-0.14.0 lib/galakei/filter/haml.rb
galakei-0.13.7 lib/galakei/filter/haml.rb
galakei-0.13.6 lib/galakei/filter/haml.rb
galakei-0.13.5 lib/galakei/filter/haml.rb
galakei-0.13.4 lib/galakei/filter/haml.rb
galakei-0.13.3 lib/galakei/filter/haml.rb
galakei-0.13.2 lib/galakei/filter/haml.rb
galakei-0.13.1 lib/galakei/filter/haml.rb