Skip to content

Commit

Permalink
fix render
Browse files Browse the repository at this point in the history
  • Loading branch information
borkdude committed Oct 7, 2024
1 parent 7d5e6c8 commit 57733c0
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions dev/nextjournal/markdown/render.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
[nextjournal.markdown.transform :as md.transform]
[nextjournal.clojure-mode :as clojure-mode]
[nextjournal.clerk.render.code :as code]
[reagent.core :as r]
[clojure.string :as str]
[nextjournal.clerk.render :as render]))
[nextjournal.clerk.render :as render]
[reagent.core :as r]))

(def theme #js {"&.cm-editor.cm-focused" #js {:outline "none"}
".cm-activeLine" #js {:background-color "rgb(226 232 240)"}
Expand Down Expand Up @@ -85,14 +85,13 @@
:block-formula (fn [_ctx node]
[:div {:dangerouslySetInnerHTML {:__html (.renderToString katex (md.transform/->text node) #js {:displayMode true})}}])))

(defn try [x]
(defn inspect-expanded [x]
(r/with-let [expanded-at (r/atom {:hover-path [] :prompt-multi-expand? false})]
(render/inspect-presented {:!expanded-at expanded-at}
(v/present x))))

(defn try-markdown [init-text]
(let [
text->state (fn [text]
(let [text->state (fn [text]
(let [parsed (md/parse text)]
{:parsed parsed
:hiccup (nextjournal.markdown.transform/->hiccup renderers parsed)}))
Expand Down

0 comments on commit 57733c0

Please sign in to comment.