Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

List indentation is incorrect for OL #274

Closed
zhuochun opened this issue Jan 20, 2019 · 0 comments · Fixed by #292
Closed

List indentation is incorrect for OL #274

zhuochun opened this issue Jan 20, 2019 · 0 comments · Fixed by #292
Labels

Comments

@zhuochun
Copy link
Owner

zhuochun commented Jan 20, 2019

https://spec.commonmark.org/0.28/#list-items

The most important thing to notice is that the position of the text after the list marker determines how much indentation is needed in subsequent blocks in the list item. If the list marker takes up two spaces, and there are three spaces between the list marker and the next non-whitespace character, then blocks must be indented five spaces in order to fall under the list item.


Eg 1:

1. abc
  - abc // 2 spaces indent
2. askldjf

Render 1:

  1. abc
  • abc // 2 spaces indent
  1. askldjf

Eg 2:

1. abc
   - abc // 3 spaces indent
     - efg // 5 spaces indent
2. askldjf

Render 2:

  1. abc
    • abc // 3 spaces indent
      • efg // 5 spaces indent
  2. askldjf

Eg 3:

- abc
  1. abc // 2spaces indent
- askldjf

Render 2:

  • abc
    1. abc // 2spaces indent
  • askldjf
@zhuochun zhuochun changed the title List alignment List indentation is incorrect for OL Jul 20, 2019
@zhuochun zhuochun added bug and removed enhancement labels Jul 20, 2019
zhuochun added a commit that referenced this issue Aug 24, 2019
zhuochun added a commit that referenced this issue Aug 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant