Hi Guys,
this liquid tag is being rendered, although it’s inside comment tags. I don’t believe this is the intended behavior?
{% comment %}
Example snippet that does stuff
Usage:
{%- liquid
if condition
render 'snippet', variable: variable
endif
-%}
{% endcomment %}
@thcurran
When running this code on my end it doesn’t render what is within the comment tags, which leads me to assume that the code is being rendered from elsewhere.
Kind regards,
Diego
@diego_ezfy Thanks for your reply!
I was too quick to speak. The code ist not being executed but rather the theme checker picks it up as actual code and throws an error, if the liquid code is malformed. I guess this is ok, as there shouldn’t be any bad liquid code, even in comments. It is a little confusing though.
Thomas
for reference, here is how to reproduce:
{% comment %}
Example snippet that does stuff
Usage:
{%- liquid
if condition and
other condition
render 'snippet', variable: variable
endif
-%}
{% endcomment %}
The line break in the chained if conditions causes the error.