nextjournal

grahamcarlyle 2021-11-08T13:54:18.075Z

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

grahamcarlyle 2021-11-08T13:54:26.075100Z

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

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

grahamcarlyle 2021-11-08T13:56:18.075300Z

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 ..."

mkvlr 2021-11-08T16:33:26.075500Z

thanks for the report! Looking into it.

mkvlr 2021-11-08T16:33:36.075800Z

(I can reproduce the problem)

mkvlr 2021-11-08T17:06:29.076200Z

can you try https://github.com/nextjournal/clerk/commit/1678b2959840ee226b988cf112a17d7f3575dd79? Plan to cut a release with this tomorrow

👍 1
grahamcarlyle 2021-11-09T12:29:14.076400Z

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
mkvlr 2021-11-09T17:52:47.092400Z

I did force push so the sha changed…

mkvlr 2021-11-09T17:52:52.092700Z

thanks for trying it!