Test if class in attrs
This commit is contained in:
parent
07c7caade1
commit
4fe4060a1f
1 changed files with 1 additions and 1 deletions
|
@ -87,7 +87,7 @@
|
||||||
(defn insert-into-class [item class insertion-element]
|
(defn insert-into-class [item class insertion-element]
|
||||||
(let [condition (every? true? [(map? item)
|
(let [condition (every? true? [(map? item)
|
||||||
(= (:type item) :element)
|
(= (:type item) :element)
|
||||||
(= (:attrs item) {:class class})])]
|
(= class (:class (:attrs item)))])]
|
||||||
(if condition
|
(if condition
|
||||||
(let [content (:content item)]
|
(let [content (:content item)]
|
||||||
(assoc-in item [:content] (conj content insertion-element)))
|
(assoc-in item [:content] (conj content insertion-element)))
|
||||||
|
|
Loading…
Reference in a new issue