rewrite-clj 2021-10-10

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

6

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

❤️ 2

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

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

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

Thank you!!

Example:

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

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

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

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

oh, good to know :) thank you!

👍 1