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

Does nothing to incomplete HTML #1185

Closed
JamesCoyle opened this issue Sep 10, 2016 · 8 comments
Closed

Does nothing to incomplete HTML #1185

JamesCoyle opened this issue Sep 10, 2016 · 8 comments
Assignees
Labels
Milestone

Comments

@JamesCoyle
Copy link

It seems that any HTML files without the html or body tags do not get beautified. It would be nice if they were appropriately indented regardless of whether they are fully formed HTML documents or not.

@Glavin001
Copy link
Owner

Please follow the issue template provided. More specifically, adding a link to the required debug.md Gist which includes debugging information that answers our most commonly asked questions: https://github.com/Glavin001/atom-beautify/blob/master/ISSUE_TEMPLATE.md#how-to-create-debugmd-gist
Thank you.

@Glavin001
Copy link
Owner

/cc @prettydiff in case the beautifier being used is Pretty Diff.

@JamesCoyle
Copy link
Author

Ah I just realized I'm using a .php file (out of habit) which is why the indentation isn't working.

@Glavin001 Glavin001 self-assigned this Sep 10, 2016
@Glavin001 Glavin001 added this to the v0.30.0 milestone Sep 10, 2016
@JamesCoyle
Copy link
Author

JamesCoyle commented Sep 10, 2016

@Glavin001 Why doesn't the HTML in PHP files get beautified? Am I missing a setting or is this feature missing?

@Glavin001
Copy link
Owner

The PHP beautifiers don't appear to support HTML and then the HTML beautifiers don't support PHP.
Related issues:

I am working on rewriting Atom-Beautify using a new core library, Unibeautify, which I plan to have a way to beautify HTML and PHP both separately, with their respective beautifiers, and merge the result back together.

@JamesCoyle
Copy link
Author

Could you not just run the HTML beautifier after the PHP one? I doubt I've exhaustively tried every eventuality but from my testing it seems to work well enough. The php tags should just be treated as a normal HTML tag from what I can see. An option in the PHP settings to also trigger a HTML beautification would be awesome.

Glad to hear it's being worked on though.

@Glavin001
Copy link
Owner

Could you not just run the HTML beautifier after the PHP one?

Yeah I described the wrong feature 😜. There is one new feature for running a list of beautifiers (such as PHP then HTML or two different JavaScript beautifiers, etc) and another more complex feature for languages like Vue ( #722 ) that will detect different pieces as different languages and apply the appropriate beautifier. Regardless, languages such as PHP should be seeing an improvement in future releases, once I am done with developing Unibeautify v1.

@prettydiff
Copy link
Collaborator

@JamesCoyle I recently extended the js parser in Pretty Diff to support C#, Java, and TypeScript. It is not currently on my agenda, but I could also extended it to support PHP.

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

3 participants