liquid-rust
liquid-rust copied to clipboard
What is this "continue" in for-loops?
Example test:
let assigns = v!({ "array": { "items": [1, 2, 3, 4, 5, 6, 7, 8, 9, 0] } });
let markup = r#"
{%for i in array.items limit: 3 %}{{i}}{%endfor%}
next
{%for i in array.items offset:continue limit: 3 %}{{i}}{%endfor%}
next
{%for i in array.items offset:continue limit: 3 %}{{i}}{%endfor%}
"#;
let expected = r#"
123
next
456
next
789
"#;
assert_template_result!(expected, markup, assigns);
See https://github.com/Shopify/liquid/blob/master/lib/liquid/tags/for.rb#L124