theme-tools
theme-tools copied to clipboard
liquid format error
Describe the bug The minus sign should stick with the percentage sign.
Unformatted source
{%-if customer.name==some_name-%}{%-endif-%}
Expected output
{%- if customer.name == some_name -%}{%- endif -%}
Actual output
{%- if customer.name == some_name- %}{%- endif -%}
Debugging information
- Mac
- Version 1.0.6
Additional context

Argh. That's because - is ambiguous here. It's a valid variable name character and it is a character used to close the tag.
I would have to verify if the ruby parser considers it as a variable character or as a character to close the tag for whitespace stripping.
Alright so ruby parser considers it as closing tag character. Indeed a bug.