Support value-less attributes
As reported by @mlhetland in #6. They suggest attr=nothing as a possible way of expressing this, but I'm not sure that's very intuitive as other empty values (e.g. []) mean that the attribute should not be rendered at all. Suggestions welcome.
Well, if you don’t rely directly on named tuple syntax, you could simply permit valueless keys directly in HAML. (How it’s implemented behind the scenes is then less important; you could use some other sentinel than nothing – one internal to HAML.jl?)
Also: It doesn’t seem like a general, intuitive “emptiness” is predictive of being hidden , as using an empty string still renders the attribute (with an empty value).
I like your first suggestion: just support it at a syntax level like
%script(defer)
which doesn't seem to conflict with anything else. Internally, after parsing, it makes sense to use some sentinel singleton as you say.