sorawee / fmt

A code formatter for Racket
Other
72 stars 6 forks source link

`for/set` loops with multiple body forms get forced onto one line #64

Closed jackfirth closed 3 weeks ago

jackfirth commented 3 weeks ago

fmt changes this code:

(for/set ([x (in-range 0 10)])
  (displayln x)
  (* x x))

into this:

(for/set ([x (in-range 0 10)]) (displayln x) (* x x))

However, it only does this for for/set for loops. Other for loops don't get their body forms squashed onto the same line. for/set should have the same behavior as the other loops.

sorawee commented 3 weeks ago

This should be very easy. May I suggest that you try fixing it? :-)

But if by tonight you have not done it yet, I will do it myself.

jackfirth commented 3 weeks ago

Will do, after work :) I had a hunch this one would be easy.