# Haml Changelog ## 3.2.0 (Unreleased) * HTML2Haml has been extracted to a separate gem, creatively named "html2haml". * Haml now supports only Rails 3 and above, and Ruby 1.8.7 and above. If you still need support for Rails 2 and Ruby 1.8.6, please use Haml 3.1.x which will continue to be maintained for bug fixes. * Added `remove_whitespace` option to always remove all whitespace around Haml tags. (thanks to [Tim van der Horst](https://github.com/vdh)) * Haml now flattens deeply nested data attribute hashes. For example: `.foo{:data => {:a => "b", :c => {:d => "e", :f => "g"}}}` would render to: `
` (thanks to [Péter Pál Koszta](https://github.com/koszta)) * Filters that rely on third-party template engines are now implemented using [Tilt](github.com/rtomayko/tilt). Several new filters have been added, namely SCSS (:scss), LessCSS, (:less), and Coffeescript (:coffee/:coffeescript). Though the list of "official" filters is kept intentionally small, Haml comes with a helper method that makes adding support for other Tilt-based template engines trivial. As of 3.2, Haml will also ship with a "haml-contrib" gem that includes useful but less-frequently used filters and helpers. This includes several additional filters such as Nokogiri, Yajl, Markaby, and others. * Generate object references based on `#to_key` if it exists in preference to `#id`. * Performance improvements. (thanks to [Chris Heald](https://github.com/cheald)) * Add an {file:REFERENCE.md#hyphenate_data_attrs-option `:hyphenate_data_attrs` option} that converts underscores to hyphens in your HTML5 data keys. This is a language change from 3.1 and is enabled by default. (thanks to [Andrew Smith](https://github.com/fullsailor)) * Helper `list_of` takes an extra argument that is rendered into list item attributes. (thanks [Iain Barnett](http://iainbarnett.me.uk/)) * Fix parser to allow lines ending with `some_method?` to be a Ruby multinline. (thanks to [Brad Ediger](https://github.com/bradediger)) * Always use :xhtml format when the mime_type of the rendered template is 'text/xml'. (thanks to [Stephen Bannasch](https://github.com/stepheneb)) * html2haml now includes an `--html-attributes` option. (thanks [Stefan Natchev](https://github.com/snatchev)) * Fix for inner whitespace removal in loops. (thanks [Richard Michael](https://github.com/richardkmichael)) * Use numeric character references rather than HTML entities when escaping double quotes and apostrophes in attributes. This works around some bugs in Internet Explorer earlier than version 9. (thanks [Doug Mayer](https://github.com/doxavore)) * Fix multiline silent comments: Haml previously did not allow free indentation inside multline silent comments. ## 3.1.6 * In indented mode, don't reindent buffers that contain preserved tags, and provide a better workaround for Rails 3.2.3's textarea helpers. ## 3.1.5 * Respect Rails' `html_safe` flag when escaping attribute values (thanks to [Gerad Suyderhoud](https://github.com/gerad)). * Fix for Rails 3.2.3 textarea helpers (thanks to [James Coleman](https://github.com/jcoleman) and others). ## 3.1.4 * Fix the use of `FormBuilder#block` with a label in Haml. * Fix indentation after a self-closing tag with dynamic attributes. ## 3.1.3 * Stop partial layouts from being displayed twice. ## 3.1.2 * If the ActionView `#capture` helper is used in a Haml template but without any Haml being run in the block, return the value of the block rather than the captured buffer. * Don't throw errors when text is nested within comments. * Fix html2haml. * Fix an issue where destructive modification was sometimes performed on Rails SafeBuffers. * Use character code entities for attribute value replacements instead of named/keyword entities. ## 3.1.1 * Update the vendored Sass to version 3.1.0. ## 3.1.0 * Don't add a `type` attribute to ` is now transformed into: :javascript function foo() { return 12; } * `
` and `