Skip to content

Commit

Permalink
switch to FencedBlocks
Browse files Browse the repository at this point in the history
  • Loading branch information
pbaille committed Dec 14, 2024
1 parent 2663cbe commit 21a4d9f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions scripts/create_client_guide_ns.clj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
(:require [commonmark-hiccup.core :as h]
[clojure.string :as str]))

(defmethod h/node-properties org.commonmark.node.IndentedCodeBlock [node]
(defmethod h/node-properties org.commonmark.node.FencedCodeBlock [node]
(h/property-map node))

(defmethod h/node-properties org.commonmark.node.Code [node]
Expand All @@ -27,8 +27,11 @@
(self content))
(self remaining)))

(= :pre h) (cons (list '$ 'noon.client.ui/code-editor {:source (str/trim (second (second x)))})
(self xs))
(= :pre h) (let [[_ [_ props source]] x]
(cons (list '$ 'noon.client.ui/code-editor
(merge props
{:source (str/trim source)}))
(self xs)))

(seq? (second x)) (cons (concat (list '$ h) (self (second x)))
(self xs))
Expand Down

0 comments on commit 21a4d9f

Please sign in to comment.