mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-15 12:20:40 -07:00
The `modulo` filter used JavaScript's `%` (truncated remainder, sign follows the dividend). Shopify/Ruby Liquid uses floored modulo, where the result takes the sign of the divisor. Since liquidjs advertises Shopify compatibility, negative operands produced the wrong sign. Use `((v % arg) + arg) % arg` to match Ruby's `%`. Positive-operand results are unchanged.