puranjayjain / language-liquid

Liquid language support for Atom.
MIT License
28 stars 23 forks source link

Support for Whitespace Control #20

Closed rickydazla closed 7 years ago

rickydazla commented 7 years ago

Shopify introduced some new syntax to control whitespace in rendered Liquid docs: https://help.shopify.com/themes/liquid/basics/whitespace e.g.

{%- comment -%}
  {{- someVariable -}}
{%- endcomment -%}
rickydazla commented 7 years ago

@puranjayjain I would make a PR but my regex skills are poor! Note that they say "If you don't want any of your tags to output whitespace, as a general rule you can add hyphens to both sides of all your tags ({%- and -%}):" — so, I guess in the snippets it would be nice if they expanded with these as standard. What do you think?

puranjayjain commented 7 years ago

Go ahead give it a shot. Yes I agree there should a mechanism for that. More and more languages are supporting whitespace control so it should be in built