Skip to content

Markdown Writer: Omit extra spaces at ordered lists #11130

@marph91

Description

@marph91

Related discussion: #11129

This is a follow-up of #7172, where this feature was discussed for unordered lists.

Current Behavior (Pandoc 3.8)

$ printf "1. 1\n   1. 1.1\n2. 2" | pandoc --from markdown --to markdown -
1.  1
    1.  1.1
2.  2

Suggested Behavior

Single digit - omit space

1. 1
   1. 1.1
2. 2

Two digits - keep space as before

1.  1
    1.  1.1
2.  2
3.  3
4.  4
5.  5
6.  6
7.  7
8.  8
9.  9
10. 10

Three or more digits

Probably, it should be aligned like:

1.   1
     1.  1.1
10.  10
100. 100

Not sure how often that long lists occur, though.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions