-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(if): Base if is an existence check
A couple releases ago, I made liquid consistently treat non-existent variables as a hard error. To help with checking for variable existence, `contains` operator was finally implemented. That doesn't help with globals though. So to support globals, I'm relaxing the non-existence restrictions within a unary-if. ie you can now do ``` {% if title %} {{ title }} {% endif %} ``` Fixes cobalt-org/cobalt.rs#363
- Loading branch information
Showing
2 changed files
with
87 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters