nextjournal / clerk

⚡️ Moldable Live Programming for Clojure
https://clerk.vision
ISC License
1.79k stars 77 forks source link

Simplify handling of Fragments #598

Closed zampino closed 9 months ago

zampino commented 9 months ago

Use the recently introduced cell-viewer to simplify the handling of fragments. In particular, fragments are now eagerly unwinded before the presentation of each document block. This also makes the application of the result viewer explicit, that is no longer based on a predicate matching qualified keys.

This also fixes the display of defined values in fragments (#600) with the exception of expressions like:

(clerk/fragment [ 1 2 (def x 3) ])
(apply clerk/fragment [(def x 1) 2 3])
(apply clerk/fragment (list (def x 1) 2 3))

Fixes #599. Fixes #600.