From a9306075b340b62e2ca3546386d5e4c6082b38dd Mon Sep 17 00:00:00 2001 From: Saskia Lindner Date: Thu, 21 Sep 2017 15:17:04 +0200 Subject: [PATCH] Fix hiccup structure --- src/day8/re_frame/trace/app_state.cljs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/day8/re_frame/trace/app_state.cljs b/src/day8/re_frame/trace/app_state.cljs index 1e0ad8a..20ad4d9 100644 --- a/src/day8/re_frame/trace/app_state.cljs +++ b/src/day8/re_frame/trace/app_state.cljs @@ -36,14 +36,15 @@ (if (number? jsonml) jsonml (let [[head & args] jsonml - tagnames #{"span" "ol" "li" "div"}] + tagnames #{"div" "span" "ol" "li" "table" "tr" "td"}] (cond (contains? tagnames head) (let [[style & children] args] - [(keyword head) {:style (-> (js->clj style) - (get "style") - (string->css))} - (into [:div {:style {:display "inline-block"}}] - (mapv jsonml->hiccup children))]) + (into + [(keyword head) {:style (-> (js->clj style) + (get "style") + (string->css))}] + (map jsonml->hiccup children))) + (= head "object") [data-structure jsonml] (= jsonml ", ") " " :else jsonml))))