Skip to content

Commit

Permalink
Liquid: Removed unmatchable object variants (#3135)
Browse files Browse the repository at this point in the history
  • Loading branch information
RunDevelopment committed Oct 5, 2021
1 parent c6574e6 commit 05e7ab0
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 32 deletions.
2 changes: 1 addition & 1 deletion components/prism-liquid.js
Expand Up @@ -12,7 +12,7 @@ Prism.languages.liquid = {
greedy: true
},
'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/,
'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/,
'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/,
'function': [
{
pattern: /(\|\s*)\w+/,
Expand Down
2 changes: 1 addition & 1 deletion components/prism-liquid.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 0 additions & 30 deletions tests/languages/liquid/object_feature.test
Expand Up @@ -7,7 +7,6 @@
{{ checkout }}
{{ collection }}
{{ color }}
{{ comment }}
{{ country }}
{{ country_option_tags }}
{{ currency }}
Expand All @@ -23,7 +22,6 @@
{{ filter_value }}
{{ font }}
{{ forloop }}
{{ form }}
{{ fulfillment }}
{{ generic_file }}
{{ gift_card }}
Expand All @@ -45,7 +43,6 @@
{{ page_description }}
{{ page_image }}
{{ page_title }}
{{ paginate }}
{{ part }}
{{ policy }}
{{ product }}
Expand All @@ -57,7 +54,6 @@
{{ rule }}
{{ script }}
{{ search }}
{{ section }}
{{ selling_plan }}
{{ selling_plan_allocation }}
{{ selling_plan_group }}
Expand All @@ -66,7 +62,6 @@
{{ shop_locale }}
{{ sitemap }}
{{ store_availability }}
{{ tablerow }}
{{ tax_line }}
{{ template }}
{{ theme }}
Expand Down Expand Up @@ -125,11 +120,6 @@
["object", "color"],
["delimiter", "}}"]
]],
["liquid", [
["delimiter", "{{"],
["keyword", "comment"],
["delimiter", "}}"]
]],
["liquid", [
["delimiter", "{{"],
["object", "country"],
Expand Down Expand Up @@ -205,11 +195,6 @@
["object", "forloop"],
["delimiter", "}}"]
]],
["liquid", [
["delimiter", "{{"],
["keyword", "form"],
["delimiter", "}}"]
]],
["liquid", [
["delimiter", "{{"],
["object", "fulfillment"],
Expand Down Expand Up @@ -315,11 +300,6 @@
["object", "page_title"],
["delimiter", "}}"]
]],
["liquid", [
["delimiter", "{{"],
["keyword", "paginate"],
["delimiter", "}}"]
]],
["liquid", [
["delimiter", "{{"],
["object", "part"],
Expand Down Expand Up @@ -375,11 +355,6 @@
["object", "search"],
["delimiter", "}}"]
]],
["liquid", [
["delimiter", "{{"],
["keyword", "section"],
["delimiter", "}}"]
]],
["liquid", [
["delimiter", "{{"],
["object", "selling_plan"],
Expand Down Expand Up @@ -420,11 +395,6 @@
["object", "store_availability"],
["delimiter", "}}"]
]],
["liquid", [
["delimiter", "{{"],
["keyword", "tablerow"],
["delimiter", "}}"]
]],
["liquid", [
["delimiter", "{{"],
["object", "tax_line"],
Expand Down

0 comments on commit 05e7ab0

Please sign in to comment.