Closed pjchender closed 1 year ago
@pjchender, thanks for raising this. The reason this is happening is due to a diffing algorithm that attempts to update just the parts of the code that changed after formatting. Instead of the whole document being replaced on format.
It's clear from your observations that this diffing solution is deeply flawed. I'll see what I can do to resolve this in a future release.
I came here to raise the same issue. Thanks for being proactive.
@pjchender this is resolved in the latest release.
@lukehaas thank you so much!
I am unsure why the formatter sometimes breaks the code after prettifying it, which is annoying.
Take the code as an example,
After formatting, however, it produces a duplicate line of
return result
:Another example is that,
It becomes to,
I have no idea why this happened.