Hi,
In both Eclipse 3.5 and 3.6 M7, the Javascript formatter seems to mangle code indentation badly in certain cases.
If line comments are used in either conditional blocks or function bodies, the Javascript formatter produces:
f(x, function() {
function g() {
if (true) {
// Comment
return true;
} else {
// Comment
return false;
}
}
});
f(x, function() {
function g() {
forEach( [], function() {
// Comment
var x = 1;
});
}
});
The formatter, however, produces the correct output for block comments.
f(x, function() {
function g() {
if (true) {
/* Comment */
return true;
} else {
/* Comment */
return false;
}
}
});
f(x, function() {
function g() {
forEach( [], function() {
/* Comment */
var x = 1;
});
}
});
Shall I file a bug for this?
Thanks in advance!
- Kian Win