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

Liquid files with 2 Extensions handled differently #249

Open
devatdotdev opened this issue Mar 8, 2020 · 1 comment
Open

Liquid files with 2 Extensions handled differently #249

devatdotdev opened this issue Mar 8, 2020 · 1 comment
Labels
waiting for response ⏳ Waiting for response from user after requesting more information.

Comments

@devatdotdev
Copy link

Is your feature request related to a problem? Please describe.
It is not an issue with the current code, but a request to update the way it processes files with an extension before .liquid

Describe the solution you'd like

Description

I would also like to see support for the several possible forms of liquid, used in files with format ..liquid.

Match extensions - Info on what needs to be done
*.html.liquid: - Beautified as HTML, then the result should be beautified as liquid. Current liquid formatters never seem to place control blocks on new lines such as {% if %} / {% endif %} and counterparts {%- if -%} / {%- endif -%} or {% for %} / {% endfor %} as examples. These tags should be placed on new lines matching parent line's indentation AFTER the file is formatted as regular HTML for best results.
*.scss.liquid: - Beautified as SCSS, then the result should be beautified as liquid (explanation above.)
*.js.liquid: - Beautified as JavaScript, then the result should be beautified as liquid (explanation above.)
*.liquid - Beautified as Liquid only.

Describe alternatives you've considered
I have searched far and wide for a code formatter that works will with .liquid files and .html.liquid, etc. One doesn't exist yet. I believed your project was uniquely prepared to handle this as it integrates several other beautifiers so theoretically you could chain beautifiers to achieve a better result for these files.

Additional context
I realize that this would require a beautifier to run AFTER others in the chain, that performs the "control blocks on new lines" feature, so I will be looking into writing this myself and will submit a link to the github project once created. If you are able to allow for a new feature to chain beautifiers, I believe there would be other uses for this in other template languages as well.

@Glavin001
Copy link
Member

@devatdotdev : Liquid is supported: https://unibeautify.com/docs/language-liquid
Have you tried https://playground.unibeautify.com/ ? Could you provide some examples of what does and does not work?

@Glavin001 Glavin001 added the waiting for response ⏳ Waiting for response from user after requesting more information. label Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for response ⏳ Waiting for response from user after requesting more information.
Projects
None yet
Development

No branches or pull requests

2 participants