I've just added two new tags: increment and decrement. Their names are quite explanatory, the tags will increment and decrement a given value.
For example:
{% assign val = "2" %}{% increment val %}{{ val }}
will render to 3, and
{% assign val = "2" %}{% decrement val %}{{ val }}
will render to 1.
I've also refactored the tests making them more readable by adding a small helper function.
Hello!
I've just added two new tags: increment and decrement. Their names are quite explanatory, the tags will increment and decrement a given value. For example:
will render to 3, and
will render to 1.
I've also refactored the tests making them more readable by adding a small helper function.