mikeboers / PyHAML

Pythonic implementation of HAML, cross compiling to Mako template syntax.
BSD 3-Clause "New" or "Revised" License
97 stars 13 forks source link

Can't have dashes in attribute names #9

Closed mikeboers closed 13 years ago

mikeboers commented 13 years ago

The following does not compile:

%tag(data-key="value")

Perhaps one can adopt the "standard" that camel case is converted to dashes; an example:

%tag(dataKey="value")

Renders to:

<tag data-key="value">...</tag>

Although, this would not allow us to have camel case at all. A "magic" keyword argument could be passed to override this behaviour, but this seems somewhat hacky.

mikeboers commented 13 years ago

Added the camel case conversion in a couple commits, ending in aa4c3bd859c2f61c34ea.