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
Wrong indentation after multi-line function call #6731
Comments
Please write an actual result and an expected result. I'm not sure what you expect yet. |
What's unclear about this?:
Expected result: there should be no indentation in the next line after the above code. |
Please write them as code to avoid misunderstanding. |
Write what as code? The expected and observed behavior? That makes no sense. I honestly don't understand what you want from me. I gave you the example code, the instructions to reproduce, the expected and observed behavior. I don't understand what else you need and I don't see what part of the report can possibly be unclear. Have you tried the example code? You don't notice anything strange? |
Please write like this <?php
$result = someFunction(
"example {$postId}"
); // type enter key here Expected result: <?php
$result = someFunction(
"example {$postId}"
);
// no indentation here Actual result: <?php
$result = someFunction(
"example {$postId}"
);
// one indentation is added here Maybe, what you expect is this, right? |
Yes that's what I meant. Can you reproduce? |
Reproducible. |
- apache#6731 - When a multi-line parameter of a method invocation has a string with a variable(e.g. `"example {$example}"`), ignore the variable within the string(i.e. {$example}) to avoid adding extra indentations Example: ```php $x = test( "test {$test}" );// enter key here ``` Before: ```php $x = test( "test {$test}" ); // one indentation is added ``` After: ```php $x = test( "test {$test}" ); // no indentation ```
- apache#6731 - When a multi-line parameter of a method invocation has a string with a variable(e.g. `"example {$example}"`), ignore the variable within the string(i.e. {$example}) to avoid adding extra indentations Example: ```php $x = test( "test {$test}" );// enter key here ``` Before: ```php $x = test( "test {$test}" ); // one indentation is added ``` After: ```php $x = test( "test {$test}" ); // no indentation ```
- apache#6731 - When a multi-line parameter of a function/method invocation has a string with a variable(e.g. `"example {$example}"`), ignore the variable within the string(i.e. {$example}) to avoid adding extra indentations Example: ```php $x = test( "test {$test}" );// enter key here ``` Before: ```php $x = test( "test {$test}" ); // one indentation is added ``` After: ```php $x = test( "test {$test}" ); // no indentation ```
Fix incorrect indentation behavior #6731
Fixed. |
Apache NetBeans version
Apache NetBeans 19
What happened
After the following code:
the next line after that should have zero indentation.
Instead, it gets indented with 4 spaces, i.e. one indentation.
A real-world use case might be something like this:
after which I get even 2 indentations (i.e. 8 spaces).
How to reproduce
In a PHP file type this:
and then add a newline. Observe how the new line gets automatically indented.
Did this work correctly in an earlier version?
No / Don't know
Operating System
Manjaro Linux
JDK
21; OpenJDK 64-Bit Server VM 21+35
Apache NetBeans packaging
Third-party package
Anything else
No response
Are you willing to submit a pull request?
No
The text was updated successfully, but these errors were encountered: