Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

whitespace control hyphen snippets missing #181

Open
Arifursdev opened this issue Dec 22, 2023 · 3 comments
Open

whitespace control hyphen snippets missing #181

Arifursdev opened this issue Dec 22, 2023 · 3 comments
Labels
✖️ Boycott This will not be implemented or the issue is lacking logic

Comments

@Arifursdev
Copy link

I think prev. version of the plugin had whitespace control hyphen snippets.
https://shopify.github.io/liquid/basics/whitespace/

{% assign test = 'text' %}

// whitespace control:

{%- assign test = 'text' -%}
@Arifursdev
Copy link
Author

#182 PR fixes this.

@panoply
Copy link
Owner

panoply commented Dec 22, 2023

Hey @Arifursdev,

Yeah, I dropped support for this in v4 because Æsthetic applies whitespace trims using the Liquid formatting rule delimiterTrims (see here). Extending the snippets feels a tad extraneous.

@Arifursdev
Copy link
Author

Hello @panoply ,
I see, I don't use formatter for liquid files. and there are cases when sometimes the whitespace will not be used, eg:

<div class="classA{% if true %} ClassB{% endif %}">Test</div>
// <div class="classA ClassB">Test</div> ✅

<div class="classA{%- if true -%} ClassB{%- endif -%}">Test</div>
// <div class="classAClassB">Test</div> ❌

so I don't know if the formatter has such rules to avoid making all of them have whitespace trimmed... imo formatter is a different thing than having snippets where we can choose which one we want to use depending on situation.

I think I will just go back to prev. version for the snippets or add them locally for myself.

@panoply panoply added the ✖️ Boycott This will not be implemented or the issue is lacking logic label Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✖️ Boycott This will not be implemented or the issue is lacking logic
Projects
None yet
Development

No branches or pull requests

2 participants