slim-template / haml2slim

Haml to Slim converter.
http://slim-lang.com/
120 stars 20 forks source link

Haml's HTML5 Custom Data Attributes #6

Closed ghost closed 7 years ago

ghost commented 12 years ago

Hi,

Haml has special support for HTML5 Custom Data Attributes[1], haml2slim seems to choke on them. They'll probably need to be converted to regular attributes.

#main_stream.stream{:data => {:guids => stream.aspect_ids.join(',')}}

This is what haml2slim generates:

#main_stream.stream{:data =>  guids=stream.aspect_ids.join(',')}

This is what it's probably supposed to look like.

#main_stream.stream data-guids=stream.aspect_ids.join(',')

[1] http://haml-lang.com/docs/yardoc/file.HAML_REFERENCE.html#html5_custom_data_attributes