You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yeah, the new formatter sometimes doesn't know what to do with comments in unusual places. It tends to attach them to the subsequent token, which is always owned by the deepest subexpression. That in turn means that subexpression contains a newline (from the line comment) which forces all of the surrounding expressions to split.
I kept running into these bugs and finally in #1615 found a more systematic way to handle them. It looks like this issue is fixed on the main branch already, so it seems #1615 is doing its job. I'll add a regression test for this.
I was surprised by this in the new formatting. Here is an input text:
The formatter likes all that code on one line. If I want to add a comment for the
i.isEven
expression, then it insists on splitting:🤕 Ouch. If this is intentional, I'll trust your research, and you can close.
The text was updated successfully, but these errors were encountered: