This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-03-05
Channels
- # beginners (3)
- # boot (205)
- # cider (41)
- # clojars (1)
- # clojure (76)
- # clojure-colombia (1)
- # clojure-dusseldorf (3)
- # clojure-russia (314)
- # clojure-sg (1)
- # clojurebridge (1)
- # clojurescript (115)
- # css (2)
- # cursive (5)
- # editors (2)
- # funcool (2)
- # hoplon (18)
- # jobs (62)
- # jobs-discuss (28)
- # ldnclj (1)
- # leiningen (10)
- # mount (9)
- # off-topic (4)
- # om (93)
- # parinfer (10)
- # proton (1)
- # re-frame (19)
- # ring-swagger (18)
Inserting the square bracket here does something surprising (unless you know the parinfer algo). It results in: (is= {:things [1 :stuff :yup (test-me args)]})
but it's actually easy to miss that test-me
was slurped in, especially if you are just trying to wrap the 1
in brackets. It would be less surprising if the unbalanced [
had it's closing pair inserted before the }
. (is= {:things [1 :stuff :yup]} (test-me args))
As it stands, you need to find where the map used to end, and re-splice it (need to close ]
and the }
). With the suggestion you need only close the ]
. I feel like I've been bit by this a few times.
I have been bit by a similar variation of this
I would describe it Parinfer closing ending parens on the same line in not the place I want it to close
I'm not sure if the algorithm can be improved to deal with cases like this
thanks @snoe
that behavior sucks, I’ll look at it
@snoe thought about some, tracking here: https://github.com/shaunlebron/parinfer/issues/102