Open greg-at-droit opened 8 years ago
Thank you for hiccup!
I'm curious what's the thinking behind taking only the name of keywords here?
name
(extend-protocol ToString clojure.lang.Keyword (to-str [k] (name k)) ....
As a result:
user> (hiccup.util/as-str :foo/bar) "bar" user> (hiccup.core/html [:p :foo/bar]) "<p>bar</p>"
Now that I understand what's happening, a work-around is to force keywords to str. But it was confusing me for longer than I'd like to admit, so I wanted to ask.
str
Thank you for hiccup!
I'm curious what's the thinking behind taking only the
name
of keywords here?As a result:
Now that I understand what's happening, a work-around is to force keywords to
str
. But it was confusing me for longer than I'd like to admit, so I wanted to ask.