Shopify / theme-check

The Ultimate Shopify Theme Linter
Other
338 stars 95 forks source link

Nokogiri cannot properly parse HTML attributes in some scenarios #648

Closed karreiro closed 1 year ago

karreiro commented 1 year ago

Nokogiri cannot parse HTML attributes in some scenarios.

When Theme Check handles template fragments like this, Nokogiri cannot loading recognise the tag attributes.

<img {{ "something" }}loading="lazy">

A naive approach for solving this is appending an empty character after the "≬#####≬" placeholder, however while it seems right, it impacts other parts of the codebase. Thus, I'm still validating this approach.