From fff7da5ed997a5ef6ca3e753f51aff97830420db Mon Sep 17 00:00:00 2001 From: Martin Kavalar Date: Thu, 26 Dec 2024 12:17:11 +0100 Subject: [PATCH] Migrate to code non-depreacted viewer --- notebooks/viewers/code.clj | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/notebooks/viewers/code.clj b/notebooks/viewers/code.clj index e3648b7c2..aa2364579 100644 --- a/notebooks/viewers/code.clj +++ b/notebooks/viewers/code.clj @@ -1,6 +1,5 @@ ;; # 👔 Code Viewer (ns viewers.code - {:nextjournal.clerk/no-cache true} (:require [nextjournal.clerk :as clerk] [nextjournal.clerk.viewer :as viewer])) @@ -81,8 +80,10 @@ fn main() { (map + fib (rest fib))))") (def editor-sync-viewer - (assoc viewer/viewer-eval-viewer :render-fn '(fn [!code _] - [:div.bg-neutral-50 [nextjournal.clerk.render.code/editor !code]]))) + (assoc viewer/viewer-eval-viewer + :render-fn + '(fn [!code _] + [:div.bg-neutral-50 [nextjournal.clerk.render.code/editor !code]]))) ^{::clerk/sync true ::clerk/viewer editor-sync-viewer} (defonce editable-code (atom "(def fib