Open phambinh217 opened 6 years ago
This implementations is expected to behave just like the Ruby's.
Please try referring to the Shopify Liquid docs: https://help.shopify.com/themes/liquid/tags/theme-tags#include
Note that there are at least three variants of Liquid. If something doesn't work here, probably that's because the variant you're looking has diverged from the canonical implementation. However, feel free to open an issue about the case.
https://help.shopify.com/themes/liquid/tags/theme-tags#include
I test at section include tag parameters
But this lib return result difference shoptity. Is it a bug, or what?
Can't tell without a code! Please file an issue with an example code. Or even better: make a PR with a failing example.
I have tow files, named color.liquid, and master.liquid In master.liquid, i include color.liquid
Bellow it code
for color.liquid
color: '{{ color }}'
shape: '{{ shape }}'
for master.liquid
{% assign shape = 'circle' %}
{% include 'color' %}
{% include 'color' with 'red' %}
{% include 'color' with 'blue' %}
{% assign shape = 'square' %}
{% include 'color' with 'red' %}
The result I want to have
color: '' shape: 'circle'
color: 'red' shape: 'circle'
color: 'blue' shape: 'circle'
color: 'red' shape: 'square'
But now, result is
color: '' shape: 'circle'
color: '' shape: 'circle'
color: '' shape: 'circle'
color: '' shape: 'square'
Can you check
I see in
TagInclude
, but i don't understant, can you give a example for each case?