Don't throw syntax errors in {% comment %} blocks
mattdrose opened this issue · comments
This is a bit of an opinion piece, but I don't think we should be throwing syntax errors for liquid in a comment block. A use case for comments is excluding code that you don't want to run—this means it may be incomplete and not working. I think this was already considered to a degree since there's an escape hatch for tags that aren't registered (via unknown_tag
overwrite). For example:
This will successfully parse:
{% comment %}
{% not_a_valid_tag %}
{% endcomment %}
This will throw a syntax error:
{% comment %}
{% cycle %}
{% endcomment %}
I believe both of these should parse without error.