Javascript comment formatting

No autoformatting via Ctrl + Alt + L, look like XML problem was also

// Separate method just for running the scripts
            executeEmbeddedScripts(tempDiv) {
                const scripts = tempDiv.querySelectorAll('script');
                scripts.forEach(script => {

0

Unfortunately, it’s not quite clear what the problem is. Can you please describe it in more detail? Could you specify the expected vs actual results? Also, what does it have to do with XML?

0

1. Before formatting

// Separate method just for running the scripts
executeEmbeddedScripts(tempDiv) {
const scripts = tempDiv.querySelectorAll('script');
scripts.forEach(script => {

2. After formatting, comment not indented

// Separate method just for running the scripts
            executeEmbeddedScripts(tempDiv) {
                const scripts = tempDiv.querySelectorAll('script');
                scripts.forEach(script => {

I checked XML, I was wrong, comments indenting workinf well there

 

0

Kindly verify that the option Keep when reformatting > Comment at first column is disabled in Settings | Editor | Code Style | JavaScript | Wrapping and Braces.

1

Uncheck it, working well, thanks

0

Glad to hear it helped.

0

请先登录再写评论。