rewrite-clj

lread 2021-10-10T15:57:59.076900Z

Exciting news! Our very talented @borkdude is now officially a co-maintainer of rewrite-clj! Woot woot!

6
borkdude 2021-10-10T16:15:33.078300Z

Happy to help and share the awesomeness that is rewrite-clj!

❤️ 2
lread 2021-10-10T16:47:57.080600Z

I guess there is no reason not to cut a new release - I expect that Clojure v1.8 support would unblock you, right @vemv?

✌️ 1
ericdallo 2021-10-10T18:16:32.082500Z

Hellor, is there any reason to rewrite-clj.node/newlines insert a space after the new line? 🧵

lread 2021-10-11T21:55:01.084200Z

Actually… if you found this unclear, others will too. I’ll clarify in docstrings.

ericdallo 2021-10-11T22:43:21.084400Z

Thank you!!

lread 2021-10-11T22:43:53.084600Z

Done!

ericdallo 2021-10-10T18:16:58.082600Z

Example:

(-> (z/edit-> (z/of-string "(foo)")
              (z/insert-left (n/newlines 1)))
    z/up
    (z/string))
; => "\n (foo)"

ericdallo 2021-10-10T18:17:17.082800Z

I would like to add only the newline without the sapce, like "\n(foo)"

ericdallo 2021-10-10T18:22:30.083Z

Oh, just found that z/insert-newline-left doesn't add the space :)

lread 2021-10-10T19:40:44.083200Z

@ericdallo, insert-left is trying to be whitespace-helpful. You can use insert-left* when you don’t want this help:

(-> (z/edit-> (z/of-string "(foo)")
              (z/insert-left* (n/newlines 1)))
    z/up
    (z/string))
;; => "\n(foo)"

ericdallo 2021-10-10T19:41:34.083400Z

oh, good to know :) thank you!

👍 1