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

Support HUGO commands in html #1996

Closed
4 of 5 tasks
jandechent opened this issue Jan 3, 2018 · 2 comments
Closed
4 of 5 tasks

Support HUGO commands in html #1996

jandechent opened this issue Jan 3, 2018 · 2 comments
Labels

Comments

@jandechent
Copy link

Description

Flattens all commands in the layout html files of the hugo CMS into one single line. But it should respect the programming structure and indent as in e.g. js - or at least leave the parts unchanged.

Input Before Beautification

<div class="row">
	{{range (sort ( (where .Data.Pages "Section" "x" ) ) ".Params.weight" "desc" )}}`
		{{ if in .Params.tags "y" `}}
			{{ partial "person6u" .}}
		{{end}}
	{{end}}
</div>

Expected Output

<div class="row">
	{{range (sort ( (where .Data.Pages "Section" "x" ) ) ".Params.weight" "desc" )}}`
		{{ if in .Params.tags "y" `}}
			{{ partial "person6u" .}}
		{{end}}
	{{end}}
</div>

Actual Output

<div class="row">
	{{range (sort ( (where .Data.Pages "Section" "x" ) ) ".Params.weight" "desc" )}}`{{ if in .Params.tags "y" `}}{{ partial "person6u" .}}{{end}}{{end}}
</div>

Steps to Reproduce

  1. Add code to Atom editor
  2. Run command Atom Beautify: Beautify Editor
  3. This beautified code does not look right!

Checklist

I have:

  • Tried uninstalling and reinstalling Atom Beautify to ensure it installed properly
  • Reloaded (or restarted) Atom to ensure it is not a caching issue
  • Searched through existing Atom Beautify Issues at https://github.com/Glavin001/atom-beautify/issues
    so I know this is not a duplicate issue
  • Filled out the Input, Expected, and Actual sections above or have edited/removed them in a way that fully describes the issue.
  • Generated debugging information by executing Atom Beautify: Help Debug Editor command in Atom and added link for debug.md Gist to this issue
@stevenzeck
Copy link
Contributor

@jandechent which beautifier are you using for these files?

@stale
Copy link

stale bot commented Mar 4, 2018

This issue has been automatically marked as stale because it has not had recent activity. If this is still an issue, please add a comment. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants