mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-15 08:50:45 -07:00
Fix wrong space characters & hard returns
This commit is contained in:
+1
-3
@@ -3,9 +3,7 @@ title: Comment
|
|||||||
description: An overview of comments tags in the Liquid template language.
|
description: An overview of comments tags in the Liquid template language.
|
||||||
---
|
---
|
||||||
|
|
||||||
Allows you to leave un-rendered code inside a Liquid template. Any text within
|
Allows you to leave un-rendered code inside a Liquid template. Any text within the opening and closing `comment` blocks will not be printed, and any Liquid code within will not be executed.
|
||||||
the opening and closing `comment` blocks will not be printed, and any Liquid code
|
|
||||||
within will not be executed.
|
|
||||||
|
|
||||||
<p class="code-label">Input</p>
|
<p class="code-label">Input</p>
|
||||||
```liquid
|
```liquid
|
||||||
|
|||||||
+10
-10
@@ -99,7 +99,7 @@ Limits the loop to the specified number of iterations.
|
|||||||
<!-- if array = [1,2,3,4,5,6] -->
|
<!-- if array = [1,2,3,4,5,6] -->
|
||||||
{% for item in array limit:2 %}
|
{% for item in array limit:2 %}
|
||||||
{{ item }}
|
{{ item }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -118,7 +118,7 @@ Begins the loop at the specified index.
|
|||||||
<!-- if array = [1,2,3,4,5,6] -->
|
<!-- if array = [1,2,3,4,5,6] -->
|
||||||
{% for item in array offset:2 %}
|
{% for item in array offset:2 %}
|
||||||
{{ item }}
|
{{ item }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -155,15 +155,15 @@ Defines a range of numbers to loop through. The range can be defined by both lit
|
|||||||
<p class="code-label">Input</p>
|
<p class="code-label">Input</p>
|
||||||
```liquid
|
```liquid
|
||||||
{% raw %}
|
{% raw %}
|
||||||
{% for i in (3..5) %}
|
{% for i in (3..5) %}
|
||||||
{{ i }}
|
{{ i }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% assign num = 4 %}
|
{% assign num = 4 %}
|
||||||
{% assign range = (1..num) %}
|
{% assign range = (1..num) %}
|
||||||
{% for i in range %}
|
{% for i in range %}
|
||||||
{{ i }}
|
{{ i }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -183,7 +183,7 @@ Reverses the order of the loop. Note that this flag's spelling is different from
|
|||||||
<!-- if array = [1,2,3,4,5,6] -->
|
<!-- if array = [1,2,3,4,5,6] -->
|
||||||
{% for item in array reversed %}
|
{% for item in array reversed %}
|
||||||
{{ item }}
|
{{ item }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -363,17 +363,17 @@ Defines a range of numbers to loop through. The range can be defined by both lit
|
|||||||
|
|
||||||
{% assign num = 4 %}
|
{% assign num = 4 %}
|
||||||
<table>
|
<table>
|
||||||
{% tablerow i in (1..num) %}
|
{% tablerow i in (1..num) %}
|
||||||
{{ i }}
|
{{ i }}
|
||||||
{% endtablerow %}
|
{% endtablerow %}
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<!--literal number example-->
|
<!--literal number example-->
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
{% tablerow i in (3..5) %}
|
{% tablerow i in (3..5) %}
|
||||||
{{ i }}
|
{{ i }}
|
||||||
{% endtablerow %}
|
{% endtablerow %}
|
||||||
</table>
|
</table>
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
```
|
```
|
||||||
|
|||||||
+1
-2
@@ -3,8 +3,7 @@ title: Raw
|
|||||||
description: An overview of raw tags in the Liquid template language.
|
description: An overview of raw tags in the Liquid template language.
|
||||||
---
|
---
|
||||||
|
|
||||||
Raw temporarily disables tag processing. This is useful for generating content
|
Temporarily disables tag processing. This is useful for generating certain content (eg, Mustache, Handlebars) that uses conflicting syntax.
|
||||||
(eg, Mustache, Handlebars) which uses conflicting syntax.
|
|
||||||
|
|
||||||
<p class="code-label">Input</p>
|
<p class="code-label">Input</p>
|
||||||
```liquid
|
```liquid
|
||||||
|
|||||||
Reference in New Issue
Block a user