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
1 changed files with 12 additions and 1 deletions

View File

@ -178,7 +178,7 @@ Conditionals can also provide the `else` case.
### Negation
The inverse of `<% if %>` is `<% if not %>`.
You can check if a variable is false with `<% if not %>`.
```ss
<% if not $DinnerInOven %>
@ -186,6 +186,17 @@ The inverse of `<% if %>` is `<% if not %>`.
<% 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
Multiple checks can be done using `||`, `or`, `&&` or `and`.