Exciting news! Our very talented @borkdude is now officially a co-maintainer of rewrite-clj! Woot woot!
Happy to help and share the awesomeness that is rewrite-clj!
I guess there is no reason not to cut a new release - I expect that Clojure v1.8 support would unblock you, right @vemv?
It’s alive!: https://github.com/clj-commons/rewrite-clj/blob/main/CHANGELOG.adoc#v10699-alpha
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!!
Done!
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!