3bmd icon indicating copy to clipboard operation
3bmd copied to clipboard

parse-print roundtrip changes list formatting

Open 3b opened this issue 2 months ago • 1 comments

(3bmd::parse-string-and-print-to-stream "- a
- b
" t :format :markdown)

;; ->

"- a

- b
"

but those don't quite parse the same:

(3bmd::parse-doc "- a
- b
")
;; ((:BULLET-LIST (:LIST-ITEM (:PLAIN "a")) (:LIST-ITEM (:PLAIN "b"))))

(3bmd::parse-doc "- a

- b
")
;; ((:BULLET-LIST (:LIST-ITEM (:PARAGRAPH "a")) (:LIST-ITEM (:PARAGRAPH "b"))))

3b avatar Nov 21 '25 02:11 3b

(it also changes the bullet character, for example from * to - but that doesn't affect how the result is parsed, so probably not worth fixing)

3b avatar Nov 21 '25 03:11 3b