Make the documentation for increment/decrement clearer

The increment and decrement tags are special in that they would output or echo the variable's final value onto the page (or whatever output sink you're using). This needs to be mentioned in the documentation.

Please see Shopify#1399 for more info and discussion.
This commit is contained in:
ADTC
2021-03-05 02:53:01 +08:00
committed by GitHub
parent 6a01c98702
commit 95dca87f49

View File

@@ -79,7 +79,7 @@ I am 35 and my favourite food is pizza.
## increment
Creates a new number variable, and increases its value by one every time it is called. The initial value is 0.
Creates and outputs a new number variable. On subsequent calls, it increases its value by one and outputs the new value. The initial value is 0.
<p class="code-label">Input</p>
```liquid
@@ -122,7 +122,7 @@ In the example below, a variable named "var" is created through `assign`. The `i
## decrement
Creates a new number variable, and decreases its value by one every time it is called. The initial value is -1.
Creates and outputs a new number variable. On subsequent calls, it decreases its value by one and outputs the new value. The initial value is -1.
<p class="code-label">Input</p>
```liquid