You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2022/06/23 14:09:24 UTC
[GitHub] [netbeans] Chris2011 opened a new issue, #4277: Wrong formatting inside JavaScript object by hitting "."
Chris2011 opened a new issue, #4277:
URL: https://github.com/apache/netbeans/issues/4277
### Apache NetBeans version
Apache NetBeans 14
### What happened
When you have this piece of code:
```javascript
const test = {
};
```
and you hit enter after the open bracket, it will auto indent n-spaces depends on the defaults/settings. For me it is 4 spaces. When you now hit ".", the formatting jumps 8 spaces further which is not correct.
```javascript
const test = {
.
};
```
![js-misformatting](https://user-images.githubusercontent.com/795658/175318390-d90fc8c4-fb8d-45b3-95f3-8459ff5cab84.gif)
### How to reproduce
* Open/Create a new JS file inside an HTML5 Project
* Type the example code in
* Go to the new line between the brackets and hit "."
* It will add more spaces than expected. Doesn't matter whether the cursor is on position 0 or on the indentation (please see my little screencast)
### Did this work correctly in an earlier version?
No
### Operating System
Windows 11
### JDK
OpenJDK Runtime Environment 14+36-1461
### Apache NetBeans packaging
Apache NetBeans provided installer
### Anything else
I also set the JavaScript features to "ESNext" that also didn't work out.
### Are you willing to submit a pull request?
No
### Code of Conduct
Yes
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists