Whitespace control in Shopify Liquid
问题 Shopify recently added whitespace control to the Liquid templating language: https://help.shopify.com/themes/liquid/basics/whitespace You essentially add an hyphen in your tag syntax {{- -}} , {%- -%} to strip whitespace (html empty line) outputted by a tag. For example: {%- assign variable = "hello" -%} {{ variable }} Renders: hello Instead of: hello Is there a way to turns this on for all assign tags? and/or all specific control flow or iteration tags? 回答1: Indeed. You turn it on when you