Skip to content

Commit

Permalink
Merge branch 'main' into ssr-debug
Browse files Browse the repository at this point in the history
  • Loading branch information
borkdude committed Nov 11, 2024
2 parents 7fbd710 + c3ae5b3 commit 67b03cd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions bb.edn
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
:paths ["bb"]
:deps {io.github.nextjournal/dejavu {:git/sha "4980e0cc18c9b09fb220874ace94ba6b57a749ca"}
io.github.nextjournal/cas-client {:git/sha "d9f838937ebc8b645fe5764949e72a6df8e344de"}
mvxcvi/multiformats {:git/url "https://github.com/borkdude/greglook-clj-multiformats"
:git/sha "e5b6980cf2850f1070a2c28a9893ecb2a060c267"}}
mvxcvi/multiformats {:git/url "https://github.com/greglook/clj-multiformats"
:git/sha "1189f1fb26db180cd8dcfd50518cdf553c0ff9e1"}}
:tasks
{:requires
([tasks :as t]
Expand Down
4 changes: 3 additions & 1 deletion src/nextjournal/clerk/viewer.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,9 @@
:render-fn 'nextjournal.clerk.render/render-number
#?@(:clj [:transform-fn (update-val #(cond-> %
(or (instance? clojure.lang.Ratio %)
(instance? clojure.lang.BigInt %)) pr-str))])})
(instance? clojure.lang.BigInt %)
(> % 9007199254740992)
(< % -9007199254740992)) pr-str))])})

(def number-hex-viewer
{:name `number-hex-viewer :render-fn '(fn [num] (nextjournal.clerk.render/render-number (str "0x" (.toString (js/Number. num) 16))))})
Expand Down
6 changes: 5 additions & 1 deletion test/nextjournal/clerk/viewer_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,11 @@
(is (match? {:nextjournal/value "1142497398145249635243N"}
(v/present 1142497398145249635243N)))
(is (match? {:nextjournal/value "10/33"}
(v/present 10/33))))
(v/present 10/33)))
(is (match? {:nextjournal/value "9007199254740993"}
(v/present 9007199254740993)))
(is (match? {:nextjournal/value "-9007199254740993"}
(v/present -9007199254740993))))

(testing "opts are not propagated to children during presentation"
(let [count-opts (fn [o]
Expand Down

0 comments on commit 67b03cd

Please sign in to comment.