1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00

[Haml] Default to :html5 under Rails 3.

This commit is contained in:
Nathan Weizenbaum 2010-05-30 17:32:35 -07:00
parent 67efe15366
commit eac7a5f369
3 changed files with 11 additions and 0 deletions

View file

@ -17,6 +17,12 @@ Rather than defaulting to `"utf-8"`,
it defaults to the encoding of the source document,
and only falls back to `"utf-8"` if this encoding is `"us-ascii"`.
### Other Changes
* Default to the {file:HAML_REFERENCE.md#format-option `:html5` format}
when running under Rails 3,
since it defaults to HTML5 as well.
## 3.0.6
[Tagged on GitHub](http://github.com/nex3/haml/commit/3.0.6).

View file

@ -46,6 +46,10 @@ unless Haml::Util.rails_env == "development"
Haml::Template.options[:ugly] ||= true
end
if ActionPack::VERSION::MAJOR >= 3
Haml::Template.options[:format] ||= :html5
end
# Decide how we want to load Haml into Rails.
# Patching was necessary for versions <= 2.0.1,
# but we can make it a normal handler for higher versions.

View file

@ -9,6 +9,7 @@ require 'sass'
require 'haml/template'
Haml::Template.options[:ugly] = false
Haml::Template.options[:format] = :xhtml
Sass::RAILS_LOADED = true unless defined?(Sass::RAILS_LOADED)