Saving after commenting, formatter moves these commented lines out of the function

Hi, wanted to share my pain point while debugging in rescript.

While debugging, when I comment some lines and then when I save the file then the formatter moves these lines out of the function.

This causes some pain to get back to the previous state, since I had to uncomment these lines and then move them back to their original place.


Do you have a concrete code snippet where this is happening?

Yes @Maxim

let c = (a,b)=>()

5->c(() => {
  // comment will be moved out
1  }, _)


Hi @a-c-sreedhar-reddy @Maxim

I noticed if I change the line endings to LF from CRLF then the commenting/ raw js snippets formatter works as expected.

@sriky27 I was using LF when this issue occured.

Ok then its something different