sorawee / fmt

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

Bad formatting for #reader line in teachpacks #39

Closed cassanof closed 1 year ago

cassanof commented 1 year ago

Hi, the #reader line for DrRacket's teachpacks gets cut of by the formatter. demo:

;; The first three lines of this file were inserted by DrRacket. They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname my-file) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))

becomes

;; The first three lines of this file were inserted by DrRacket. They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader
(lib "htdp-intermediate-lambda-reader.ss" "lang")
((modname my-file) (read-case-sensitive #t)
                         (teachpacks ())
                         (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))

DrRacket needs that in all one line, or it refuses it to read it. I could push a fix if people want this into the main branch.

sorawee commented 1 year ago

I do want this to be fixed. Please submit a PR! Thank you :)

And FWIW, the fix can be hacky, if that makes it more convenient to fix. If you prefer that I fix it, that is OK too (but it sounds like you have a fix already?)

arjunguha commented 1 year ago

Fix here: https://github.com/cassanof/fmt/commit/8bb0794318ae7cf2867354d4b64879d282c1e16e

Thanks!

sorawee commented 1 year ago

Whoops, forgetting to close the issue.

Fixed by #40.