Merge pull request #8310 from blueo/patch-1

Add detail to negation docs
This commit is contained in:
Robbie Averill 2018-08-15 13:20:21 +12:00 committed by GitHub
commit 7daea920f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -178,7 +178,7 @@ Conditionals can also provide the `else` case.
### Negation ### Negation
The inverse of `<% if %>` is `<% if not %>`. You can check if a variable is false with `<% if not %>`.
```ss ```ss
<% if not $DinnerInOven %> <% if not $DinnerInOven %>
@ -186,6 +186,17 @@ The inverse of `<% if %>` is `<% if not %>`.
<% end_if %> <% end_if %>
``` ```
Note that you cannot combine this with other operators such as `==`.
For more nuanced check you can use the `!` operator.
```ss
<% if $MyDinner != "quiche" %>
Lets go out
<% end_if %>
```
### Boolean Logic ### Boolean Logic
Multiple checks can be done using `||`, `or`, `&&` or `and`. Multiple checks can be done using `||`, `or`, `&&` or `and`.