Currently, with ClojureScript logging, you have to choose between:
  a. Correct newlines in browser console, but no newlines in the REPL (very
ugly)
  b. Extra newlines in the browser console, and correct REPL

If you want Option A, set *print-newline* false. If you want Option B, set
*print-newline* true. You can see this with a "lein new chestnut" project
-- it chooses Option A via enable-console-print!
<https://github.com/plexus/chestnut/blob/51d25b549a255590add0d1bf8dea8d05d703b5e7/src/leiningen/new/chestnut/env/dev/cljs/chestnut/dev.cljs#L7>
.

Is there a chance we can ever get the best of both worlds? I don't think
this is possible with the current *print-fn* approach. Strings are passed
to the *print-fn* without information about whether a newline is intended.
So I think fixing this would either require passing this information, or
allowing multiple [*print-fn* *print-newline*] tuples to be set.

(Let me know if I've overlooked something)

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to