You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unless I am mistaken, this is a feature request more than an issue.
Atom-beautifier relies on FriendsOfPHP/PHP-CS-Fixer to beautify PHP files.
However PHP-CS-Fixer does not seem to handle HTML code standards. I tested it via command line against a test PHP file with HTML content and the PHP-CS-Fixer failed to format the HTML properly.
I worked through already existing issues, such as #175 and #242 and I didn't find any issue specifically targeting the HTML in PHP files.
I am not sure if this issue has been addressed previously, but if not, I would suggest that PHP files be formatted using the HTML formatter, followed by the PHP-CS-fixer. This would allow global coverage of PHP without conflict between the two formatters.
Until then, the makeshift alternative is to either rename the file to *.html and beautify or to have a second file used only for HTML beautifying, which is less than optimal.
Thanks for your answer!
The text was updated successfully, but these errors were encountered:
I am going to consider this a duplicate of #457 and recommend that you subscribe to that Issue.
The fact this #457 is a requirements for proper PHP/HTML beautification only makes #457 a higher priority issue, however it does not warrant two issues containing the same concept.
Also, it would help if you could test that this does in fact work:
Take a sample PHP/HTML hybrid file
Beautify for HTML first
Beautify for PHP second
Repeat for different orderings if you like
You can change your grammar for the current file by going up into Atom's menu -> View -> Select Grammar, then switch between HTML and PHP, etc.
Ubuntu 14.04 LTS
atom 1.0.2
atom-beautify v0.28.8
Unless I am mistaken, this is a feature request more than an issue.
Atom-beautifier relies on FriendsOfPHP/PHP-CS-Fixer to beautify PHP files.
However PHP-CS-Fixer does not seem to handle HTML code standards. I tested it via command line against a test PHP file with HTML content and the PHP-CS-Fixer failed to format the HTML properly.
I worked through already existing issues, such as #175 and #242 and I didn't find any issue specifically targeting the HTML in PHP files.
I am not sure if this issue has been addressed previously, but if not, I would suggest that PHP files be formatted using the HTML formatter, followed by the PHP-CS-fixer. This would allow global coverage of PHP without conflict between the two formatters.
Until then, the makeshift alternative is to either rename the file to *.html and beautify or to have a second file used only for HTML beautifying, which is less than optimal.
Thanks for your answer!
The text was updated successfully, but these errors were encountered: