nextjournal / clerk

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

Fix preserving expanded-at state on show #548

Closed zampino closed 1 year ago

zampino commented 1 year ago

Fix #547.

We're resetting expansion state when :nextjourna/hash is changing on a result. The hash is computed starting from the presented value using nippy/freeze. It turns out that adding pagination continuation functions (#421) as metadata on the presented result broke nippy serialization and we'd get a fresh hash (a gensym) on each call to show. We can fix it by excluding metadata when freezing.