opal / opal-haml

Opal + Haml = <3
MIT License
23 stars 5 forks source link

Support for HAML-style nested attributes, escape HTML attribute values #6

Closed Papierkorb closed 8 years ago

Papierkorb commented 8 years ago

HAML allows the user to define dashed-nested-attributes like this:

%div{ data: { foo: 123 } }

Which is the same as

%div{ 'data-foo' => 123 }

But more convenient to write IMO :)

This PR adds support for this notation in Template::OutputBuffer#attributes.

Added later on: Also escape HTML attribute values.

elia commented 8 years ago

Thanks, great addition!

elia commented 8 years ago

Released as 0.4.1 :wink:

Papierkorb commented 8 years ago

:+1: