diff --git a/notebooks/viewers/html.clj b/notebooks/viewers/html.clj index fcef041c4..989464686 100644 --- a/notebooks/viewers/html.clj +++ b/notebooks/viewers/html.clj @@ -20,3 +20,8 @@ "Go to " [:a.text-lg {:href (v/doc-url "notebooks/viewers/image.clj")} "images"] " notebook."]) nil) + +(clerk/html + [:ol (list [:li "One"] + [:li "Two"] + [:li "Three"])]) diff --git a/src/nextjournal/clerk/viewer.cljc b/src/nextjournal/clerk/viewer.cljc index 11c701c46..dbb99c5e9 100644 --- a/src/nextjournal/clerk/viewer.cljc +++ b/src/nextjournal/clerk/viewer.cljc @@ -1386,11 +1386,13 @@ (reduce compute-expanded-at state' value) state'))) -(defn collect-expandable-paths [state {:nextjournal/keys [value] :keys [path]}] - (let [state' (assoc-in state [:expanded-at path] false)] - (if (vector? value) - (reduce collect-expandable-paths state' value) - state'))) +(defn collect-expandable-paths [state wrapped-value] + (if-let [{:nextjournal/keys [value] :keys [path]} (when (wrapped-value? wrapped-value) + wrapped-value)] + (reduce collect-expandable-paths + (cond-> state path (assoc-in [:expanded-at path] false)) + (when (vector? value) value)) + state)) (defn assign-expanded-at [{:as wrapped-value :keys [content-length]}] (assoc wrapped-value :nextjournal/expanded-at (:expanded-at (if content-length