Fork me on GitHub
#rewrite-clj
<
2021-10-10
>
lread15:10:59

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

borkdude 6
borkdude16:10:33

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

❤️ 2
lread16:10:57

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
ericdallo18:10:32

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

ericdallo18:10:58

Example:

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

ericdallo18:10:17

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

ericdallo18:10:30

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

lread19:10:44

@UKFSJSM38, 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)"

ericdallo19:10:34

oh, good to know :) thank you!

👍 1
lread21:10:01

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