Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

CLJS-363: `format` %s behavior is incorrect for keyword, symbol etc.

  • Loading branch information...
commit bf0622a594473c9a6de57fe3b5d10e0419fc7a2a 1 parent df6f316
David Nolen authored
Showing with 8 additions and 1 deletion.
  1. +8 −1 src/cljs/cljs/core.cljs
9 src/cljs/cljs/core.cljs
@@ -1445,10 +1445,17 @@ reduces them without incurring seq initialization"
([s start] (.substring s start))
([s start end] (.substring s start end)))
+(declare map)
(defn format
"Formats a string using goog.string.format."
[fmt & args]
- (apply gstring/format fmt args))
+ (let [args (map (fn [x]
+ (if (or (keyword? x) (symbol? x))
+ (str x)
+ x))
+ args)]
+ (apply gstring/format fmt args)))
(defn symbol
"Returns a Symbol with the given namespace and name."
Please sign in to comment.
Something went wrong with that request. Please try again.