-
-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use filters with expressions #287
Comments
I tried the Ruby version just to find it doesn't support this too. But I'm happy to have this feature in LiquidJS. I'll keep this open till someone implement it. |
# [9.23.0](v9.22.1...v9.23.0) (2021-02-12) ### Bug Fixes * respect `fs` in parser options, for [#233](#233) ([4e82da6](4e82da6)) ### Features * support filters in if/unless/case, see [#287](#287) ([2f059f6](2f059f6)) * support function calls, closes [#222](#222) ([e37824f](e37824f)) * support layout none, closes [#299](#299) ([81e11bb](81e11bb))
The operator priority is another potential issue to use filters in expressions. {{ foo | bar: 'a' == 'b' }} // one may expect == has higher priority
{{ people | size == 1 }} // one may expect '|' has higher priority But I managed to make this work (the liquidjs/test/integration/builtin/tags/if.ts Lines 84 to 89 in 2430672
Now filters are available for expressions in |
Hi,
For some reasons, filters don't seem to work when evaluating and expressions, for example, the following will always evaluate (with filters):
The following will not evaluate:
Note that both conditions should have the same outcome
The text was updated successfully, but these errors were encountered: