Skip to content
Discussion options

You must be logged in to vote

TL;DR

  • Both of your snippets are valid CommonMark.
    In CommonMark, the space after a list marker can be 1-4. The indentation required for any following lines (including sublists) is W + N, where W is the width of the marker (e.g., 1. → 2 chars) and N is the spaces after it.

    “M is a list marker of width W followed by 1 ≤ N ≤ 4 spaces of indentation … indenting subsequent lines … by W + N spaces.”
    (CommonMark section 5.2 “List items”, rule 1)

    That’s why both:

    1. Step 1
    2. Step 2
    3. Step 3
       1. Step 3.1
       2. Step 3.2
       3. Step 3.3
    

    (N = 1 → continuation/subcontent indent must be W+N = 3)

    and

    1.  Step 1
    2.  Step 2
    3.  Step 3
        1.  Step 3.1
        2.  Step 3.2
        3.  Step 3.3
    

    (N = 2 → co…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@gautaz
Comment options

Answer selected by gautaz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants