kkinnear / zprint

Executables, uberjar, and library to beautifully format Clojure and Clojurescript source code and s-expressions.
MIT License
554 stars 47 forks source link

Empty maps are removed when using `;!zprint {:format :off}` #280

Closed frou closed 1 year ago

frou commented 1 year ago
$ ./zprint --version
zprint-1.2.4

$ cat x.edn
;!zprint {:format :off}
{
  :foo {}
}

$ zprint --default <x.edn
;!zprint {:format :off}
{
  :foo
}

This seems very similar to #263, so maybe it's already fixed. I don't have a Linux machine at the moment to try 1.2.5-alpha.

I notice that putting a space in the empty map (i.e. :foo { }) stops the map from being removed.

kkinnear commented 1 year ago

Thanks for noticing this. It is indeed already fixed by #263. Nice of you to notice the similarity. I'm chagrined to notice that I was a few weeks away from releasing 1.2.5 in mid September, and now it is almost December. I'm caught up in a complicated fix for another problem that is delaying things. I am hoping to release 1.2.5 by year end. Thanks again for noticing this and reporting it. As I think I said in #263, this was a new bug in 1.2.4, so if you don't need features from 1.2.4, you can back off to 1.2.3 as a temporary workaround.

frou commented 1 year ago

Thank you Kim, I appreciate all the effort you've put into this great tool