Haml (HTML Abstraction Markup Language) is a layer on top of HTML or XML that's designed to express the structure of documents in a non-repetitive, elegant, and easy way by using indentation rather than closing tags and allowing Ruby to be embedded with ease. It was originally envisioned as a plugin for Ruby on Rails, but it can function as a stand-alone templating engine.
Critical or Security advisories for 5.0.0
This version doesn't have any advisory. Want to report one?
Changelog for 5.0.0
Released on April 26, 2017 (diff).
Haml now requires Ruby 2.0.0 or above.
Rails 3 is no longer supported, matching the official Maintenance Policy for Ruby on Rails. Use Haml 4 if you want to use Rails 3. (Tee Parham)
hamlcommand's debug option (
-d) no longer executes the Haml code, but rather checks the generated Ruby syntax for errors.
Drop parser/compiler accessor from
Haml::Template.optionsinstead. (Takashi Kokubun)
Drop dynamic quotes support and always escape
escape_attrsinstead. Also, escaped results are slightly changed and always unified to the same characters. (Takashi Kokubun)
Don't preserve newlines in attributes. (Takashi Kokubun)
HTML escape interpolated code in filters. #770 (Matt Wildig)
- Add a tracing option. When enabled, Haml will output a data-trace attribute on each tag showing the path to the source Haml file from which it was generated. Thanks Alex Babkin.
haml_tag_ifto render a block, conditionally wrapped in another element (Matt Wildig)
- Support Rails 5.1 Erubi template handler.
- Support Sprockets 3. Thanks Sam Davies and Jeremy Venezia.
- General performance and memory usage improvements. (Akira Matsuda)
- Analyze attribute values by Ripper and render static attributes beforehand. (Takashi Kokubun)
- Optimize attribute rendering about 3x faster. (Takashi Kokubun)
- Add temple gem as dependency and create
Haml::TempleEngineclass. Some methods in
Haml::Compilerare migrated to
Haml::TempleEngine. (Takashi Kokubun)
- Fix for attribute merging. When an attribute method (or literal nested hash) was used in an old style attribute hash and there is also a (non-static) new style hash there is an error. The fix can result in different behavior in some circumstances. See the commit message for detailed info. (Matt Wildig)
- Make escape_once respect hexadecimal references. (Matt Wildig)
- Don't treat the 'data' attribute specially when merging attribute hashes. (Matt Wildig and Norman Clarke)
- Fix #@foo and #$foo style interpolation that was not working in html_safe mode. (Akira Matsuda)
@as tag's class name. Thanks Joe Bartlett.
Haml::InvalidAttributeNameErrorwhen attribute name includes invalid characters. (Takashi Kokubun)
- Don't ignore unexpected exceptions on initializing
ActionView::OutputBuffer. (Takashi Kokubun)
Dependencies for 5.0.0
My projects using haml
|You should be logged in to see which of your projects use haml.|