Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SyntaxError - Unable to escape whitespace from schema tags #705

Closed
gyotov opened this issue Jan 25, 2023 · 1 comment
Closed

SyntaxError - Unable to escape whitespace from schema tags #705

gyotov opened this issue Jan 25, 2023 · 1 comment

Comments

@gyotov
Copy link

gyotov commented Jan 25, 2023

The theme check throws an error, when trying to escape whitespaces from schema tags in liquid.
Example:

{% schema %}
  "name": "Section 1",
  "settings": []
{% endschema %}

This causes the section to render whitespaces, regardless if there is anything to render, based on certain logic:

image

The solition is to escape the whitespaces from the schema tags:

{%- schema -%}
  "name": "Section 1",
  "settings": []
{%- endschema -%}

image

While this works as expected, the theme check throws an error:

image

The only acceptable solution in this case is to omit the new line at EOF, but this is not a good practise.

@lukeh-shopify
Copy link

👋🏻 Hi @gyotov! Thanks for reporting this. Unfortunately the Ruby version of theme check has been deprecated for some time. Would you be able to confirm you are still having issues when using our maintained version of theme check? This is done using either the latest version of the Shopify CLI, or via the Shopify Liquid Visual Studio Code extension.

If you are still having issues, please raise an issue over in the CLI or theme tools repositories. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants