liquid
liquid copied to clipboard
Allow range expression as general expressions (not only loops)
Currently the range expression (start..end) is only supported in loops. This PR makes is possible to use it as a general expression e.g.:
{% assign l = (1..5) | reverse %}
{% for i in l %}
{{ i -}}
{% endfor %}
results in:
5
4
3
2
1
Checklist
- [x] I have read the contribution guidelines.
- [x]
make testpasses. - [x]
make lintpasses. - [x] New and changed code is covered by tests.
- [ ] Performance improvements include benchmarks.
- [x] Changes match the documented (not just the implemented) behavior of Shopify.