Fix hiccup structure
This commit is contained in:
parent
019ebc7748
commit
a9306075b3
|
@ -36,14 +36,15 @@
|
||||||
(if (number? jsonml)
|
(if (number? jsonml)
|
||||||
jsonml
|
jsonml
|
||||||
(let [[head & args] jsonml
|
(let [[head & args] jsonml
|
||||||
tagnames #{"span" "ol" "li" "div"}]
|
tagnames #{"div" "span" "ol" "li" "table" "tr" "td"}]
|
||||||
(cond
|
(cond
|
||||||
(contains? tagnames head) (let [[style & children] args]
|
(contains? tagnames head) (let [[style & children] args]
|
||||||
|
(into
|
||||||
[(keyword head) {:style (-> (js->clj style)
|
[(keyword head) {:style (-> (js->clj style)
|
||||||
(get "style")
|
(get "style")
|
||||||
(string->css))}
|
(string->css))}]
|
||||||
(into [:div {:style {:display "inline-block"}}]
|
(map jsonml->hiccup children)))
|
||||||
(mapv jsonml->hiccup children))])
|
|
||||||
(= head "object") [data-structure jsonml]
|
(= head "object") [data-structure jsonml]
|
||||||
(= jsonml ", ") " "
|
(= jsonml ", ") " "
|
||||||
:else jsonml))))
|
:else jsonml))))
|
||||||
|
|
Loading…
Reference in New Issue