nextjournal 2021-11-08

Clerk's version of hiccup doesnt seem to support a seq as a parameter for the element's body

(clerk/html
  [:ul [:li 1] [:li 2] [:li 3] [:li 4]])

(clerk/html
  [:ul
   (for [x (range 1 4)]
     [:li x])])

I get this error in the notebook

{:via [{:type java.lang.IllegalArgumentException :message "No value supplied for key: [:li 3]" :at [clojure.lang.PersistentHashMap create "PersistentHashMap.java" 77
 :trace [[clojure.lang.PersistentHashMap create "PersistentHashMap.java" 77 [nextjournal.clerk.viewer$assign_closing_parens invokeStatic "viewer.cljc" 368 [nextjournal.clerk.viewer$assign_closing_parens invoke "viewer.cljc" 368 [nextjournal.clerk.viewer$assign_closing_parens$fn__1928$fn__1929 invoke "viewer.cljc" 383 ..."

thanks for the report! Looking into it.

(I can reproduce the problem)

that sha didn't work for me as a git dep, but when i used the sha "e07c13071408f36402a1269430c6a8beb33d43fe" then seqs in hiccup element bodies worked fine for me thanks

🙏 1

I did force push so the sha changed…

thanks for trying it!