-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Beautify does not work with PHP and that is fine... but read this. #688
Comments
What you are requesting should already be there. Please give an example input, actually output, and desired output. |
@CodeAmend ? I'd like to help you here. A little more info needed. |
@bitwiseman I can give you an example when I get home from work today, but generally what happens is something like what this comment is: brackets-beautify/brackets-beautify#142 (comment) |
I recently switched 100% linux and I cannot get the same results as thank you. On Wed, Jun 3, 2015 at 12:42 PM, T3charmy notifications@github.com wrote:
|
Well, regardless, I(plus a bunch of others) are still having this issue. it usually has to do with the $ becoming separated from the variable, or the extra space inside an array variable($example["one "]) Edit: another thing it messes up is it puts all of the PHP code on 1 line, which can mess up things like # this may not be what I'm thinking. I'll double check
# if this is something that gets messed up in about 3 hours.
if($animal == "cat")
echo "meow"; |
yes, one can just leave out the |
@user501254 I'm for all optimizing the PHP code, in fact. it'd be really awesome if it could. Just as it sits right now, it will break most code you throw at it, which isn't really ideal. numerous times I've had to go back and correct files that have gotten messed up when beautifying, eventually I just stopped using it. I was spending more time correcting than it would have taken me to beautify it myself. |
This is definitely a bug. We shouldn't break things if we can avoid it. |
another big thing this screws up, is since it puts all of the PHP on one line it would make something like: <?php
for($i = 1; $i <= 100; $i++;) {
#count to 100!
echo($i . "</br>");
}
?> the beautify would cause that code to turn into <?php for($i=1 ; $i <=1 00; $i++;) { #count to 100! echo($i . "</br>"); } ?> which due to the comment, everything after the # gets ignored, there for breaking scripts. also note the extra/incorrect spaces on $i ; and the <=1 00 |
This is SO annoying it is making Beautify useless. Please just ignore all php code. PLEASE! I spent the last few days trying to figure out what was going on in my code!!! Turns out I had beautify on save turned on!!! I disabled it a while back, and for some reason it was on again. I just never expected this. Just one small example of the HUNDREDS of problems it caused. After Beautify I never spotted it for 2 days! It costs me valuable working time. Unfortuantely, I am going to uninstall. If there is a way to give a low score, It is going to have to take a hit because of the php issues it is causing! Just ignore the php code! Also look at T3charmy example above. It does that also. This plugin just ruins php! |
Closing as duplicate of #490. This is getting fixed under that issue. |
This just ruined thousands of lines of my code. Boooooo. |
@freshdesignza You didn't make a backup huh? |
So Beautify does not support php. That is ok.
So can you please not mess with code in php tags?
What happens: It scrunches all PHP code together and adds spaces after $ !!!
Way to fix it: Just have Beautify NOT touch code in between the tags.
I think this would solve a lot of my headache at least.
The text was updated successfully, but these errors were encountered: