fmt icon indicating copy to clipboard operation
fmt copied to clipboard

Leading comments don't respect alignment from `#:indent`

Open jackfirth opened this issue 1 year ago • 0 comments

Consider this expression:

; comment
(define (foo) 1)

If I call program-format on that expression with an #:indent of 2, I get this output:

; comment
(define (foo)
  1)

But that's wrong, because it ignored the leading indentation of 2 that I specified. The output should be this:

; comment
  (define (foo)
    1)

Compare that with what happens if I call (program-format "(define (foo) 1)" #:indent 2). The output is:

(define (foo)
    1)

jackfirth avatar Aug 29 '24 01:08 jackfirth