docstrings of java-time.api contain literal \n
devurandom opened this issue · 3 comments
devurandom commented
The docstrings in java-time.api contain literal \n instead of newlines, which makes them hard to read in code. Cursive does not display them nicely either, but shows the documentation with the literal \n.
devurandom commented
I looked at
clojure.java-time/test/java_time/dev/gen.clj
Lines 193 to 217 in cd06539
(deftype DocString [value])
(defmethod print-method DocString
[^DocString this ^Writer w]
(.write w (str "\"" (.-value this) "\"")))With this, the following code (modelled after java-time.dev.gen/print-form):
(with-bindings {#'*print-meta* true}
(println (pr-str (with-meta {:value "X"} {:doc (DocString. "multi\nline\nstring")}))))prints:
^{:doc "multi
line
string"} {:value "X"}
frenchy64 commented
Could you submit a PR we can collaborate on please?
devurandom commented
Could you submit a PR we can collaborate on please?