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

Open
gyotov opened this issue Jan 25, 2023 · 0 comments
Open

SyntaxError - Unable to escape whitespace from schema tags #705

gyotov opened this issue Jan 25, 2023 · 0 comments

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.

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

1 participant