-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Description
I'm using version 0.0.25, and classes specified in tags aren't being rendered correctly:
user> (require '[lambdaisland.hiccup :as hiccup])
nil
user> (hiccup/render [:div.foo] {:doctype? false})
"<div class=\"clojure.lang.LazySeq@18ce5\"></div>"Some test cases that would currently fail if added:
(testing "classes in tags"
(is (= (hiccup/render [:div.foo] {:doctype? false})
"<div class=\"foo\"></div>"))
(is (= (hiccup/render [:div.foo.bar] {:doctype? false})
"<div class=\"foo bar\"></div>"))
(is (= (hiccup/render [:div.foo {:class "bar"}] {:doctype? false})
"<div class=\"foo bar\"></div>"))
(is (= (hiccup/render [:div.foo {:class "foo"}] {:doctype? false})
"<div class=\"foo foo\"></div>")))In lambdaisland.hiccup/nodify, it looks like classes from the tag get included in the value for the keyword attribute :class, but the string attribute "class" is the one that gets joined to create a valid class value.
Metadata
Metadata
Assignees
Labels
No labels