RejectedSoftware Forums

Sign up

Attributes without values should get the attribute name as value?

Shouldn't "tag(attribute)" be translated to <tag
attribute="attribute"/>?
Now it's translated to <tag attribute=""/>

Re: Attributes without values should get the attribute name as value?

Am 30.08.2012 13:59, schrieb simendsjo:

Shouldn't "tag(attribute)" be translated to <tag attribute="attribute"/>?
Now it's translated to <tag attribute=""/>

Seems like this was only required for XHTML:
http://thoughtresults.com/html5-boolean-attributes

Since right now HTML 5 is the only supported output type, I don't think
it makes sense to support that. I'd like to have the <tag attribute/> at
some day, but that's just cosmetics.

Re: Attributes without values should get the attribute name as value?

On Thursday, 30 August 2012 at 13:05:46 UTC, Sönke Ludwig wrote:

Am 30.08.2012 13:59, schrieb simendsjo:

Shouldn't "tag(attribute)" be translated to <tag
attribute="attribute"/>?
Now it's translated to <tag attribute=""/>

Seems like this was only required for XHTML:
http://thoughtresults.com/html5-boolean-attributes

Since right now HTML 5 is the only supported output type, I
don't think
it makes sense to support that. I'd like to have the <tag
attribute/> at
some day, but that's just cosmetics.

Yeah, it's not a html5 requirement, but (I think) jade specifies
that it should render as attr="attr". That's also supported in
html5, so this way it should work on both 5 and previous versions.