Skip to content

Commit c4e0279

Browse files
russolsenstuarthalloway
authored andcommitted
Add test for and then fix pprint of code (ns foo).
Signed-off-by: Stuart Halloway <[email protected]>
1 parent d9f3f83 commit c4e0279

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/clj/clojure/pprint/dispatch.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@
211211
(when (next args)
212212
((formatter-out "~:_"))))))
213213
(recur (next args))))))
214-
(write-out reference)))
214+
(when reference (write-out reference))))
215215

216216
(defn- pprint-ns
217217
"The pretty print dispatch chunk for the ns macro"

test/clojure/test_clojure/pprint/test_pretty.clj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ Usage: *hello*
178178
(pprint-simple-code-list writer alis)))")
179179

180180
(code-block ns-macro-test
181+
"(ns foobarbaz)"
181182
"(ns slam.hound.stitch
182183
(:use [slam.hound.prettify :only [prettify]]))"
183184

0 commit comments

Comments
 (0)