On 6/16/17 8:55 AM, Steven Schveighoffer wrote:

On 6/16/17 8:41 AM, Steven Schveighoffer wrote:

Can diet handle adding or not adding an attribute based on a D boolean?
That would make this a LOT better.

I will note that pug handles this via:

input(type='radio' name='b' value='0' checked=false) // checked is
omitted from the html

But diet doesn't let me do this (I think):

input(type='radio',name='b',value='0',checked=#{mybool}) // Error:
expression expected, not '#' (and a whole bunch of other errors

Hah, got it to work. Thanks for the detailed spec at
https://github.com/rejectedsoftware/diet-ng/blob/master/SPEC.md !


That's actually pretty easy :) I had no idea you could just put a D
expression in there...