Valid liquid code causes TokenizationError #630
b-wall
started this conversation in
Working with Shopify
Replies: 1 comment 1 reply
-
I don't recognize {{ arr | compact | join: ',' }} Could you add a link to the snippet so we can have a better understanding? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The following code breaks the LiquidJS parser:
<a class="text-black underline hover:text-gray-300" href="http://www.google.com/maps/search/?api=1&query={{ location.name }} - {{ [location.address1, location.address2].compact.join(', ') }}, {{ location.city }}, {{ location.province }}, {{ location.zip }}" target="_blank"> Open map <span class="small">→</span> </a>
More specifically, this part:
{{ [location.address1, location.address2].compact.join(', ') }}
Although this is not common liquid, its actually used in Shopify's official 'ready to pickup' email template.
Is there a way you could cause this type of code not to throw an error? Thank you.
Beta Was this translation helpful? Give feedback.
All reactions