I use staticmatic for templates I use later with PHP. There is an odd situation where some tag attributes have single quotes, while some have double quotation marks. I would
Quote from: http://haml.info/docs/yardoc/file.REFERENCE.html#options
Haml understands various configuration options that affect its performance and output.
In Rails, options can be set by setting the
Haml::Template.options
hash in an initializer:
# config/initializers/haml.rb
Haml::Template.options[:format] = :html5
Outside Rails, you can set them by configuring them globally in
Haml::Options.defaults
:Haml::Options.defaults[:format] = :html5
Finally, you can also set them by passing an options hash to [Haml::Engine#initialize][1]. For the complete list of available options, please see [Haml::Options][2].
[1]: http://haml.info/docs/yardoc/Haml/Engine.html#initialize-instance_method
[2]: http://haml.info/docs/yardoc/Haml/Options.html
Try the following:
Haml::Template.options[:attr_wrapper] = '"'
Haml does indeed order attributes alphabetically, and this is indeed a consequence of Ruby's parser. In the future, attributes may be ordered in document order as much as possible, but that's not likely to happen until Haml 2.2 or later.