vibe.d selectively include attribute into tag using diet template
JG
someone at somewhere.com
Sat Feb 27 17:48:09 UTC 2021
Hi,
I know that one can do the following:
tag(attribute='#{dexpression}')
But, is there a way to deal with attributes that don't get
assigned values.
That is, is there a way to produce
<tag>
or
<tag attribute>
depending on a boolean variable?
Of course one can do:
- if (booleanVariable)
tag(attribute)
include ...
- if (!booleanVariable)
tag
include ...
But this seems rather messy.
More information about the Digitalmars-d-learn
mailing list