{"action":"opened","issue":{"url":"https://api.github.com/repos/shaunlebron/cljs-pprint/issues/16","labels_url":"https://api.github.com/repos/shaunlebron/cljs-pprint/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/shaunlebron/cljs-pprint/issues/16/comments","events_url":"https://api.github.com/repos/shaunlebron/cljs-pprint/issues/16/events","html_url":"https://github.com/shaunlebron/cljs-pprint/issues/16","id":72730910,"number":16,"title":"Extra spaces when printing","user":{"login":"bostonou","id":643345,"avatar_url":"https://avatars.githubusercontent.com/u/643345?v=3","gravatar_id":"","url":"https://api.github.com/users/bostonou","html_url":"https://github.com/bostonou","followers_url":"https://api.github.com/users/bostonou/followers","following_url":"https://api.github.com/users/bostonou/following{/other_user}","gists_url":"https://api.github.com/users/bostonou/gists{/gist_id}","starred_url":"https://api.github.com/users/bostonou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bostonou/subscriptions","organizations_url":"https://api.github.com/users/bostonou/orgs","repos_url":"https://api.github.com/users/bostonou/repos","events_url":"https://api.github.com/users/bostonou/events{/privacy}","received_events_url":"https://api.github.com/users/bostonou/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-03T01:51:17Z","updated_at":"2015-05-03T01:51:17Z","closed_at":null,"body":"In clj, we have a global `*out*`. We used our own local `*out*` since cljs doesn't have one and default to using `*print-fn*`. This can cause differences in clj/cljs pprint results depending on usage.\r\n\r\nOne example is the [clj table printing tests](https://github.com/shaunlebron/cljs-pprint/blob/master/test/clj/pprint/test_cl_format.clj#L538-L550) vs the [cljs table printing tests](https://github.com/shaunlebron/cljs-pprint/blob/master/test/cljs/cljs/pprint_test.cljs#L725-L752).\r\n\r\nIf we use `*out*` as a writer, continual calls to `cl-format` use state from previous calls. If we instead rely on `*print-fn*`, we lose some state from call to call. So far, I've seen this result in an extra/missing space at the end of a line. Not earth-shattering, but enough to fail tests.\r\n\r\nI think this is just a problem with `cl-format` but saw another space issue with [a code-dispatch test](https://github.com/shaunlebron/cljs-pprint/blob/master/test/cljs/cljs/pprint_test.cljs#L725-L752) that may be related."}}