forked from osteele/liquid
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.liquid
More file actions
58 lines (42 loc) · 1.19 KB
/
test.liquid
File metadata and controls
58 lines (42 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<h1>{{ product.name }}</h1>
<p>Price: {{ product.price }}</p>
<!-- Broken filter -->
<p>Discounted: {{ product.price | minus }}</p>
<!-- Invalid syntax -->
<p>{{ user..name }}</p>
<!-- Valid loop -->
<ul>
{% for tag in product.tags %}
<li>{{ tag }}</li>
{% endfor %}
</ul>
<!-- Broken expression -->
<p>{{ 1 + * 2 }}</p>
<!-- Undefined variable -->
<p>{{ undefinedVar }}</p>
<!-- Valid block -->
{% if product.price > 100 %}
<strong>Premium product</strong>
{% endif %}
<!-- Filter error -->
<p>{{ product.name | unknown_filter }}</p>
<h1>{{ product.name }}</h1>
{% if user %}
<p>Welcome, {{ user.name }}!</p>
<!-- forgot {% endif %} -->
{% raw %}
<div>
{% if skipped_inside_raw %}
</div>
{% endraw %}
{% comment %}
{% if something %}
This should not be parsed.
{% endcomment %}
<!-- ❌ 'endif' is missing here and 'endcomment' is misplaced -->
{{ user.email | format_email }} <!-- ❌ possibly undefined filter -->
{{ "March 14, 2016" | date: "%b %d, %y" }} {{ "Mon Jan 2 15:04:05 MST" | date: "%Y-%m-%d %H:%M" }} now: {{ "now" | date: "%Y-%m-%d %H:%M" }}
{% if !relatedBlogPosts %}
<h1>No related blog posts </h1>
{% endif %}
{{ "March 14, 2016" | date: "%b %d, %y" }}