Could also support two spaces for list indentation?


  1. Test 1.
  • Blah.
  • Blah.
  1. Test 2.
1. Test 1.
  - Blah.
  - Blah.
2. Test 2.

Because GitHub support two spaces indentation list. (also here)
Could CommonMark also support two spaces for list indentation?

Thank you guys!

See the spec for an extensive discussion of the choice points for indented lists, including an explanation of why a rigid 2-space rule wasn’t chosen.

1 Like

Thanks, I get it now.
Seems CommonMark would never use other rules than 4-spaces indentation rule.

@jackycute no, CommonMark does not use the 4-space rule (or a 2-space rule). That, too, is explained in the document I linked to.

Huh, OK, Now I read whole paragraph.
I was wrong.
So different structure have different indent rules.

The basic idea is that you need to indent to where the text after the list marker starts – not just for sublists, but for any block-level content to be included under a list item.


- Here
  - two spaces is enough
 -  Here
    - you need four
1. Here
   - you need three
1.   Here
     - you need five

Please read the whole section on list items, which covers the rules in great detail with many examples.


Thank you! Now I totally get it!

1 Like