liquid
liquid copied to clipboard
Allow loop modifiers to be more than just literals
This PR adds the ability to specify variables and expressions in loop modifiers. Example:
{% assign limit = 3 %}
{% assign offset = 1 %}
{% for i in (1..5) limit:limit offset:offset %}
{{ i -}}
{%- endfor %}
results in:
2
3
4
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.