First, this is awesome, thank you for a great library!
Boolean attribute "mirroring" currently works correctly for the "long form"; that is, input(type='checkbox' checked) works fine (see also #23).
For example, input(required=true) renders as required="required", as expected for non-HTML doctypes.
However, the "short form" doesn't work; "if the doctype is html, pug knows not to mirror the attribute". (https://pugjs.org/language/attributes.html#boolean-attributes)
These fail with "function foo not defined":
input(required)
input(type='checkbox' checked)
They should be rendered as:
<input required>
<input type="checkbox" checked>
Oddly enough, input(checked) results in the mirrored input checked="checked", but breaks once type='checkbox' is added per the example on the above pugjs page.
First, this is awesome, thank you for a great library!
Boolean attribute "mirroring" currently works correctly for the "long form"; that is,
input(type='checkbox' checked)works fine (see also #23).For example,
input(required=true)renders asrequired="required", as expected for non-HTML doctypes.However, the "short form" doesn't work; "if the doctype is html, pug knows not to mirror the attribute". (https://pugjs.org/language/attributes.html#boolean-attributes)
These fail with "function foo not defined":
They should be rendered as:
Oddly enough,
input(checked)results in the mirroredinput checked="checked", but breaks oncetype='checkbox'is added per the example on the above pugjs page.