Markdown writer: Fix ordered list bug.

Previously ordered lists starting with a code block did not
round trip. Pandoc uses an indented code block, and according
to commonmark rules only one space is gobbled after the list
marker; however, pandoc added two.  This has now been fixed.
An incidental change fixes an oddity in markua list indentation.

Closes #11762.
This commit is contained in:
John MacFarlane
2026-07-14 17:34:15 +02:00
parent bc64721fe5
commit db8d64fe6f
3 changed files with 38 additions and 28 deletions
+12
View File
@@ -0,0 +1,12 @@
```
% pandoc -f native -t commonmark | pandoc -f commonmark -t native
[ OrderedList
( 1 , Decimal , Period )
[ [ CodeBlock ( "" , [] , [] ) "hi" ] ]
]
^D
[ OrderedList
( 1 , Decimal , Period )
[ [ CodeBlock ( "" , [] , [] ) "hi" ] ]
]
```