我正在使用Jekyll开发一个原型,并发现Liquid正试图解释我的jQuery模板代码(https://github.com/jquery/jquery-tmpl)。
基本上代码应该是这样的:
{{if PackageDescription}}
<span class="package-and-price">${PackageDescription} - ${PriceString}</span>
{{else}}
<span class="package-and-price">${PriceString}</span>
{{/if}}
<span class="qty-and-edit-item">Qty: ${Count} <a href="/cart">Edit Cart</a></span>
取而代之的是:
<span class="package-and-price">${PackageDescription} - ${PriceString}</span>
<span class="package-and-price">${PriceString}</span>
<span class="qty-and-edit-item">Qty: ${Count} <a href="/cart">Edit Cart</a></span>
有没有办法/策略来阻止这种情况发生?