A range such as (1..3) works, but the same range written (1 .. 3) is silently empty: loops over it do not run, and no error is reported. Our theme formatter adds those spaces, so pagination vanished from every page it to…
A range such as (1..3) works, but the same range written (1 .. 3) is silently empty: loops over it do not run, and no error is reported. Our theme formatter adds those spaces, so pagination vanished from every page it touched. At the same time, text that is not a range at all, such as (1 , 3) or (1..3], is accepted and loops as if it were (1..3).
{% for i in (1 .. 3) %}{{ i }}{% endfor %}.{{ (1 .. 3) | join: "-" }}.{% for i in (1 , 3) %}{{ i }}{% endfor %}.1231-2-3TokenizationError.123(1..3) and ranges between variables, such as (first .. last), already work.(, around .. and before ).(, a value, .., a value and ). Anything else in that position is a syntax error and should be reported the way the tokenizer reports its other errors.Adapted from harttle/liquidjs (MIT).
Visible test command
TZ=UTC npx --no-install jest --ci --coverage=falseThe repository’s own tests. Run all tests includes them, and so does every submission.
Repository
range-with-spaces-is-empty
Changes under src/ are evaluated.