-
Notifications
You must be signed in to change notification settings - Fork 5
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
Doesn't play nice with PHP files #41
Labels
Comments
Just realized that the mockup I created didn't actually get uploaded correctly. I'll try to dig up the correct file and replace the image. |
OP comment updated with new images for WordPress |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
When this package is enabled it overrides the outline view for PHP based files. Sometimes this is ok, when the PHP file is mostly HTML with inlined PHP (i.e. WordPress template files).
However, it outright breaks PHP files that are only PHP. So when working on PHP package development
ide-html
would have to be disabled. For PHP classes such as SslCertificate.php it just shows a single item?
and overrideside-php
or orther php parsers for Atom.Expected Behavior
For PHP files that are mostly HTML with inline PHP, it would be best for the outline to just show something like
<?php
indicating that there's a block of php code. Basing the depth on the surrounding HTML.For PHP files that are only PHP code - ideally the outline will just come from the
ide-php
oride-seranata
package and not be affected by the this one.Visual Examples:
The real outline of an all PHP walker-nav file:
And a mock up of the mostly HTML template file:
Note: Image adjusted to 'fix' the current issue being described.
Actual Behavior
See images here:
This an all PHP file, same one as above:
And this is from the common
header.php
file for wordpress themes:The only issue being that the PHP tags included add artficial depth to the a.brand-text tag. And that they could potentially be better represented by
<?php
rather than?
.Possible Fix
Make PHP an optional extension to outline for - or improve interop with other
ide-*
parsers though that may not be as realistic. I'm not very familiar with Atom APIs so I'm not sure if such interop is possible.Steps to Reproduce
.php
fileContext
In order to properly debug real PHP files of any type I have to disable ide-html. Even in the PHP packages I maintain such as mallardduck/ssl-certificate.
Your Environment
The text was updated successfully, but these errors were encountered: