File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 479479 (assoc :add-comment-on-line? true )
480480 (update :nodes rest)
481481 (assoc :block-settings next-block-settings)
482- (assoc -in [:md-context :opts ] md-settings)
482+ (update -in [:md-context :opts ] merge md-settings)
483483 (update :blocks conj (add-block-id code-block)))
484484 (not (contains? state :ns ))
485485 (assoc :ns *ns*)))
Original file line number Diff line number Diff line change @@ -66,7 +66,16 @@ line\""}]
6666 (is (match? '([{:type :text , :text " $1 + $2 = $3" }]
6767 [{:type :formula , :text " 1 + " } {:type :text , :text " 2 = $3" }]
6868 [{:type :text , :text " $1 + $2 = $3" }])
69- contents)))))
69+ contents))))
70+
71+ (testing " heading ids are preserved in toc (#804)"
72+ (let [parsed (parser/parse-clojure-string " ^:nextjournal.clerk/toc (ns example)
73+
74+ ;; # Workload Analysis
75+
76+ ;; some text" )]
77+ (is (match? {:toc {:children [{:type :toc :attrs {:id " workload-analysis" }}]}}
78+ parsed)))))
7079
7180(deftest parse-inline-comments
7281 (is (match? {:blocks [{:doc {:content [{:content [{:text " text before" }]}]}}
You can’t perform that action at this time.
0 commit comments