weavejester / hiccup

Fast library for rendering HTML in Clojure
http://weavejester.github.io/hiccup
Eclipse Public License 1.0
2.68k stars 175 forks source link

Allow keywords in class vectors #167

Closed kwrooijen closed 4 years ago

kwrooijen commented 4 years ago

Currently when adding keywords to a class vector, the keywords get converted to string literally.

(html [:div {:class [:foo]}])
;;=> <div class=":foo"></div>

After PR:

(html [:div {:class [:foo]}])
;;=> <div class="foo"></div>

Not sure if this is desired, but this is also how it works in Reagent.

weavejester commented 4 years ago

That seems a reasonable change. Can you add some tests?

kwrooijen commented 4 years ago

@weavejester Done, how's this?

weavejester commented 4 years ago

That's fine, thanks.