Skip to content
This repository has been archived by the owner on Jul 27, 2024. It is now read-only.

Commit

Permalink
Read from SourceIndex.tags
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Poitrin committed Dec 6, 2022
1 parent 6ead1e6 commit d1e712d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/theme_check/shopify_liquid/tag.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,13 @@ def to_label(label)
# Remove 'tags.yml' in favor of 'SourceIndex.tags'
# -
def tags_file_contents
@tags_file_contents ||= YAML.load(File.read("#{__dir__}/../../../data/shopify_liquid/tags.yml"))
@tags_file_contents ||= SourceIndex.tags.map do |tag|
if ["case", "comment", "for", "form", "if", "javascript", "paginate", "schema", "style"].include?(tag.name)
{ tag.name => "end#{tag.name}" }
else
tag.name
end
end + ["elsif", "ifchanged", { "schema" => "endschema" }, "when"]
end
end
end
Expand Down

0 comments on commit d1e712d

Please sign in to comment.