zprint
zprint copied to clipboard
Namespace map context (`#:` syntax) is deleted when zprint style is `indent-only`
zprint is deleting the namespace map context specified by the #:
syntax when the style is indent-only
.
(zp/zprint-file-str "#:a{:b 1}" "example")
=> "#:a{:b 1}"
(zp/zprint-file-str "#:a{:b 1}" "example" {:style [:indent-only]})
=> "{:b 1}"
Thanks for the issue. That's really not good. That said, I'm interested that anyone actually uses :indent-only
! It was a lot of work, so it is nice to know someone cares. I'll work on this and make sure it gets fixed soon. Namespaced maps have been a challenge all along the way, from parsing to handling them in .clj
and .cljs
. More later as I figure this out.
I have fixed this, and it will be available in the next release, almost certainly called 1.2.4
. It will be at least two weeks at the earliest before I can test and release a new version of zprint. I hope that this problem won't cause you too much pain in the interim. I was working on a large capability and expected to be a while before I packaged up the next release, but based partly on this problem, I'll move up my release schedule to get this fixed sooner than I had otherwise planned to release it.
Thank you again for noticing and submitting this issue!
No problem. I was just evaluating it against my codebase, so it's not hurting me as of now. I believe I noticed one other thing and will open a separate issue for that.
Fixed in 1.2.4
. Thanks for noticing this! (and the other one too!).