jehugaleahsa / mustache-sharp

An extension of the mustache text template engine for .NET.
The Unlicense
306 stars 80 forks source link

Ability to check logical NOT condition in block tag such as {{#if! Condition}} {{/if}} #56

Closed bryant988 closed 8 years ago

bryant988 commented 8 years ago

Awesome work. I have a small request:

I've come across multiple scenarios where I need to check the logical NOT condition of a value such as:

if(!condition) {
    // do stuff
}

Currently, I use the {{#else}} block to handle this (with an empty {{#if}} section), but it would be nice to not have unnecessary empty "if" sections which can clutter the templates.

bryant988 commented 8 years ago

nevermind. i realized that {{#unless}} tag request was already made in #23