File tree Expand file tree Collapse file tree 3 files changed +11
-2
lines changed
Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,10 @@ Unreleased changes are available via `io.github.borkdude/html {:git/sha "..."}`
44
55[ html] ( https://github.com/borkdude/html ) : Produce HTML from hiccup in Clojure and ClojureScript
66
7+ ## 0.1.2
8+
9+ - Fix [ #3 ] ( https://github.com/borkdude/html/issues/3 ) : allow dynamic attribute value: ` (html [:a {:a (+ 1 2 3)}]) `
10+
711## 0.1.1
812
913- Fix [ #7 ] ( https://github.com/borkdude/html/issues/7 ) : boolean HTML attributes
Original file line number Diff line number Diff line change 5050 (let [m (merge base-map m)]
5151 (->attrs opts m))))
5252
53+ (defn constant? [v]
54+ (not (seq? v)))
55+
5356(defn- compile-attrs [opts m]
54- (if (contains? m :&)
57+ (if (or (contains? m :&)
58+ (not (every? constant? (vals m))))
5559 `(->attrs ~opts ~(get m :&) ~(dissoc m :&))
5660 (->attrs opts m)))
5761
Original file line number Diff line number Diff line change 7474 " <input checked=\" true\" ></input>"
7575 (xml [:input {:checked true }])
7676
77- )
77+ " <a href=\" http://dude\" ></a>"
78+ (html [:a {:href (str " http://" " dude" )}]))
7879 )
7980
8081(comment
You can’t perform that action at this time.
0 commit comments