mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-17 01:40:42 -07:00
Drop blank lines from input examples
This commit is contained in:
@@ -47,7 +47,7 @@ Liquid includes many logical and comparison operators. You can use operators to
|
||||
For example:
|
||||
|
||||
```liquid
|
||||
{% raw %}
|
||||
{%- raw -%}
|
||||
{% if product.title == "Awesome Shoes" %}
|
||||
These shoes are awesome!
|
||||
{% endif %}
|
||||
@@ -57,7 +57,7 @@ For example:
|
||||
You can do multiple comparisons in a tag using the `and` and `or` operators:
|
||||
|
||||
```liquid
|
||||
{% raw %}
|
||||
{%- raw -%}
|
||||
{% if product.type == "Shirt" or product.type == "Shoes" %}
|
||||
This is a shirt or a pair of shoes.
|
||||
{% endif %}
|
||||
@@ -69,7 +69,7 @@ You can do multiple comparisons in a tag using the `and` and `or` operators:
|
||||
`contains` checks for the presence of a substring inside a string.
|
||||
|
||||
```liquid
|
||||
{% raw %}
|
||||
{%- raw -%}
|
||||
{% if product.title contains "Pack" %}
|
||||
This product's title contains the word Pack.
|
||||
{% endif %}
|
||||
@@ -79,7 +79,7 @@ You can do multiple comparisons in a tag using the `and` and `or` operators:
|
||||
`contains` can also check for the presence of a string in an array of strings.
|
||||
|
||||
```liquid
|
||||
{% raw %}
|
||||
{%- raw -%}
|
||||
{% if product.tags contains "Hello" %}
|
||||
This product has been tagged with "Hello".
|
||||
{% endif %}
|
||||
@@ -93,7 +93,7 @@ You can do multiple comparisons in a tag using the `and` and `or` operators:
|
||||
In tags with more than one `and` or `or` operator, operators are checked in order *from right to left*. You cannot change the order of operations using parentheses — parentheses are invalid characters in Liquid and will prevent your tags from working.
|
||||
|
||||
```liquid
|
||||
{% raw %}
|
||||
{%- raw -%}
|
||||
{% if true or false and false %}
|
||||
This evaluates to true, since the `and` condition is checked first.
|
||||
{% endif %}
|
||||
@@ -101,7 +101,7 @@ In tags with more than one `and` or `or` operator, operators are checked in orde
|
||||
```
|
||||
|
||||
```liquid
|
||||
{% raw %}
|
||||
{%- raw -%}
|
||||
{% if true and false and false or true %}
|
||||
This evaluates to false, since the tags are checked like this:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user