vibe.d selectively include attribute into tag using diet template

JG someone at somewhere.com
Sun Feb 28 05:29:05 UTC 2021


On Saturday, 27 February 2021 at 19:12:55 UTC, Steven 
Schveighoffer wrote:
>
> Yes, if you assign a boolean value to it directly, then if 
> true, the attribute is included, if not, it's not.
>
> e.g.:
>
> tag(attribute=booleanVariable)
>
> Note the lack of quotes.

Thank you very much for this.

> If you use an expression without quotes
> in diet, it becomes an interpolation.

Would you mind explaining in more detail what this means? How 
could one use this, other than with booleans?


More information about the Digitalmars-d-learn mailing list