| Summary: | [formatter] JavaScript formatting breaks down in presence of line comment | ||
|---|---|---|---|
| Product: | [WebTools] JSDT | Reporter: | Wang Jialiang <starwhisperer> |
| Component: | General | Assignee: | wst.javascript <wst.javascript-inbox> |
| Status: | CLOSED DUPLICATE | QA Contact: | Phil Berkland <berkland> |
| Severity: | normal | ||
| Priority: | P3 | CC: | cmjaun, martin.von.zweigbergk, thatnitind |
| Version: | 3.0.2 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Wang Jialiang
Hello, Its helpful if you provide specific example code for these types of problems, including the starting state, the expected result, and the actual result. If you could attach that information it would assist us in investigating this bug. Thanks, Chris if (!this.lib) {
var lib = {
string : {
format : function(str, params) {
// for
for ( var i = 0; i < str.length; i++) {
}
return str;
},
escape : function(str) {
}
}
};
}
We developed a fairly large JS library, and this snippet is just part of it.
If you format this code in Eclipse JavaScript Editor, you can see the lines after "//for" are misaligned.
An interesting thing to note is that this misalignment only happens if you have the function escape placed after it. If you remove function escape, the format is correct again.
Categorizing JSDT bugzillas for planning purposes. *** Bug 293242 has been marked as a duplicate of this bug. *** *** This bug has been marked as a duplicate of bug 315234 *** |