I explain myself, Here a code example I tried:
{% assign a=1 %}
{% if a==1 %}
<h1>'a' is equal to one!</h1>
{% else %}
<h1> 'a' is NOT equal to one!</h1>
{% endif %}
The output is:
'a' is NOT equal to one!
What's going on?
在==运算符周围保留一些空间:
{% if a == 1 %}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.