-
Notifications
You must be signed in to change notification settings - Fork 5
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
Comments formatting #100
Comments
Also, some minor annoyances: some_statement(); // some comment always gets formatted into either: some_statement();
// some comment or some_statement();// some comment without at least a space before the Sometimes it formats nicely: some_statement(); // some comment so the pattern is not deterministic. This is specifically on if something {// some comments
...
} |
And comments within a statement are gone: let /* comment */ x = 42; is turned into let x = 42; |
This make formatting a bit troublesome for code with comments that are not line-level (i.e. on their own lines). In particular, comments at the end of a statement beginning with |
Also, comments following an if foo {
bar();
}
// I am an comment gets formatted to: if foo {
bar();
} |
a = 42; // I am a very very very very very very very very loooooooooooooooooooooooong comment Very long end-of-line comments move to the line below, which is probably not the intended place: a = 42;
// I am a very very very very very very very very loooooooooooooooooooooooong comment In general, end-of-line comments should stay on that same line. |
Comments on map properties: let a = #{
a: 123, // comment for a
b: 234 // comment for b
}; is formatted to: let a = #{
a: 123,
// comment for a
b:
234 // comment for b
,
}; |
Format this:
yields this:
The comment on the following line is duplicated.
The text was updated successfully, but these errors were encountered: