Skip to content

Commit 05e7ab0

Browse files
Liquid: Removed unmatchable object variants (#3135)
1 parent c6574e6 commit 05e7ab0

File tree

3 files changed

+2
-32
lines changed

3 files changed

+2
-32
lines changed

components/prism-liquid.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Prism.languages.liquid = {
1212
greedy: true
1313
},
1414
'keyword': /\b(?:as|assign|break|(?:end)?(?:capture|case|comment|for|form|if|paginate|raw|style|tablerow|unless)|continue|cycle|decrement|echo|else|elsif|in|include|increment|limit|liquid|offset|range|render|reversed|section|when|with)\b/,
15-
'object': /\b(?:address|all_country_option_tags|article|block|blog|cart|checkout|collection|color|comment|country|country_option_tags|currency|current_page|current_tags|customer|customer_address|date|discount_allocation|discount_application|external_video|filter|filter_value|font|forloop|form|fulfillment|generic_file|gift_card|group|handle|image|line_item|link|linklist|localization|location|measurement|media|metafield|model|model_source|order|page|page_description|page_image|page_title|paginate|part|policy|product|product_option|recommendations|request|robots|routes|rule|script|search|section|selling_plan|selling_plan_allocation|selling_plan_group|shipping_method|shop|shop_locale|sitemap|store_availability|tablerow|tax_line|template|theme|transaction|unit_price_measurement|user_agent|variant|video|video_source)\b/,
15+
'object': /\b(?:address|all_country_option_tags|article|block|blog|cart|checkout|collection|color|country|country_option_tags|currency|current_page|current_tags|customer|customer_address|date|discount_allocation|discount_application|external_video|filter|filter_value|font|forloop|fulfillment|generic_file|gift_card|group|handle|image|line_item|link|linklist|localization|location|measurement|media|metafield|model|model_source|order|page|page_description|page_image|page_title|part|policy|product|product_option|recommendations|request|robots|routes|rule|script|search|selling_plan|selling_plan_allocation|selling_plan_group|shipping_method|shop|shop_locale|sitemap|store_availability|tax_line|template|theme|transaction|unit_price_measurement|user_agent|variant|video|video_source)\b/,
1616
'function': [
1717
{
1818
pattern: /(\|\s*)\w+/,

components/prism-liquid.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/languages/liquid/object_feature.test

-30
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
{{ checkout }}
88
{{ collection }}
99
{{ color }}
10-
{{ comment }}
1110
{{ country }}
1211
{{ country_option_tags }}
1312
{{ currency }}
@@ -23,7 +22,6 @@
2322
{{ filter_value }}
2423
{{ font }}
2524
{{ forloop }}
26-
{{ form }}
2725
{{ fulfillment }}
2826
{{ generic_file }}
2927
{{ gift_card }}
@@ -45,7 +43,6 @@
4543
{{ page_description }}
4644
{{ page_image }}
4745
{{ page_title }}
48-
{{ paginate }}
4946
{{ part }}
5047
{{ policy }}
5148
{{ product }}
@@ -57,7 +54,6 @@
5754
{{ rule }}
5855
{{ script }}
5956
{{ search }}
60-
{{ section }}
6157
{{ selling_plan }}
6258
{{ selling_plan_allocation }}
6359
{{ selling_plan_group }}
@@ -66,7 +62,6 @@
6662
{{ shop_locale }}
6763
{{ sitemap }}
6864
{{ store_availability }}
69-
{{ tablerow }}
7065
{{ tax_line }}
7166
{{ template }}
7267
{{ theme }}
@@ -125,11 +120,6 @@
125120
["object", "color"],
126121
["delimiter", "}}"]
127122
]],
128-
["liquid", [
129-
["delimiter", "{{"],
130-
["keyword", "comment"],
131-
["delimiter", "}}"]
132-
]],
133123
["liquid", [
134124
["delimiter", "{{"],
135125
["object", "country"],
@@ -205,11 +195,6 @@
205195
["object", "forloop"],
206196
["delimiter", "}}"]
207197
]],
208-
["liquid", [
209-
["delimiter", "{{"],
210-
["keyword", "form"],
211-
["delimiter", "}}"]
212-
]],
213198
["liquid", [
214199
["delimiter", "{{"],
215200
["object", "fulfillment"],
@@ -315,11 +300,6 @@
315300
["object", "page_title"],
316301
["delimiter", "}}"]
317302
]],
318-
["liquid", [
319-
["delimiter", "{{"],
320-
["keyword", "paginate"],
321-
["delimiter", "}}"]
322-
]],
323303
["liquid", [
324304
["delimiter", "{{"],
325305
["object", "part"],
@@ -375,11 +355,6 @@
375355
["object", "search"],
376356
["delimiter", "}}"]
377357
]],
378-
["liquid", [
379-
["delimiter", "{{"],
380-
["keyword", "section"],
381-
["delimiter", "}}"]
382-
]],
383358
["liquid", [
384359
["delimiter", "{{"],
385360
["object", "selling_plan"],
@@ -420,11 +395,6 @@
420395
["object", "store_availability"],
421396
["delimiter", "}}"]
422397
]],
423-
["liquid", [
424-
["delimiter", "{{"],
425-
["keyword", "tablerow"],
426-
["delimiter", "}}"]
427-
]],
428398
["liquid", [
429399
["delimiter", "{{"],
430400
["object", "tax_line"],

0 commit comments

Comments
 (0)