File tree Expand file tree Collapse file tree 3 files changed +6
-13
lines changed Expand file tree Collapse file tree 3 files changed +6
-13
lines changed Original file line number Diff line number Diff line change 22
33## Unreleased
44
5- ...
5+ * Include ` :start ` in numbered lists
66
77## 0.7.189
88
Original file line number Diff line number Diff line change 119119
120120(defmethod open-node OrderedList [ctx ^OrderedList node]
121121 (u/update-current-loc ctx (fn [loc] (u/zopen-node loc {:type :numbered-list
122- :content []
123- :start (.getStartNumber node)}))))
122+ :content []
123+ :attrs { :start (.getStartNumber node)} }))))
124124
125125(defmethod open-node ListItem [ctx _node]
126126 (u/update-current-loc ctx (fn [loc] (u/zopen-node loc {:type :list-item :content []}))))
Original file line number Diff line number Diff line change @@ -280,25 +280,18 @@ $$\\int_a^bf(t)dt$$
280280rupt me when I'm writing." ))))
281281
282282(deftest ordered-list-start-number
283- (testing " ordered list starting with 1 has start 1"
284- (is (match? {:type :doc
285- :content [{:type :numbered-list
286- :start 1
287- :content [{:type :list-item }]}]}
288- (md/parse " 1. First item" ))))
289283 (testing " ordered list starting with number > 1 has that start number"
290284 (is (match? {:type :doc
291285 :content [{:type :numbered-list
292- :start 5
286+ :attrs { : start 5 }
293287 :content [{:type :list-item }]}]}
294288 (md/parse " 5. Fifth item" ))))
295289 (testing " interrupted list preserves start numbers"
296290 (is (match? {:type :doc
297- :content [{:type :numbered-list
298- :start 1 }
291+ :content [{:type :numbered-list }
299292 {:type :code }
300293 {:type :numbered-list
301- :start 2 }]}
294+ :attrs { : start 2 } }]}
302295 (md/parse " 1. First\n\n ```\n code\n ```\n\n 2. Second" )))))
303296
304297(deftest set-title-when-missing
You can’t perform that action at this time.
0 commit comments