-
-
Notifications
You must be signed in to change notification settings - Fork 238
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
Sequential else
tags all render
#670
Comments
I agree, possibly with an option to throw an error on superfluous Shopify/Liquid's {% case "x" -%}
{% when "y" -%}
a
{%- else -%}
b
{%- else -%}
c
{%- when "x" -%}
d
{%- when "x" -%}
e
{%- endcase %} Shopify/Liquid output
The {% case "x" -%}
{% when "x" -%}
a
{%- else -%}
b
{%- else -%}
c
{%- when "x" -%}
d
{%- when "x" -%}
e
{%- endcase %} Shopify/Liquid output
|
🎉 This issue has been resolved in version 10.10.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
When there are multiple sequential
else
tags, the content inside of eachelse
branch is rendered.Eg:
liquidjs renders:
Shopify has inconsistent rendering behaviour here, it renders only the first
else
branch insideif
andunless
conditionals, but it renders allelse
blocks inside ofcase
conditionals.I believe the correct behaviour is to render only the first
else
block in all conditionals (if
,unless
andcase
). I'd be happy to put up a fix for this.The text was updated successfully, but these errors were encountered: