Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown linter uses 2 space indentations for list items but default is 1 #48

Closed
jwoLondon opened this issue Sep 1, 2020 · 2 comments
Closed

Comments

@jwoLondon
Copy link
Member

Markdown linting rule MD030, which determines the number of spaces after a list marker, suggests 1 space by default. Validation of markdown on our GitHub setup suggests 2 and so generates listing warnings with a default formatted document.

MD030/list-marker-space Spaces after list markers [Expected: 2; Actual: 1]

Is there any reason why we shouldn't use the default of 1?

@kachkaev
Copy link
Member

kachkaev commented Sep 1, 2020

Hi Jo!

We use one space for unordered lists, so that blocks in list items were padded by two spaces.

- Hello

  Two leading spaces here 👍
  
  ```
  code listing
  ```

- World

If we do the same for the ordered lists, these elements (including code listings) will be padded by three spaces.

1. Hello

   Three leading spaces here 👎
  
   ```
   code listing
   ```

1. World

Adding one extra space makes this offset even, which simplifies actions like select + tab / select + shift tab in the editor.

1.  Hello

    Four leading spaces here 👍
  
    ```
    code listing
    ```

1.  World

Because we don't know in advance which lists will have blocks and which ones will remain simple, the same rule applies everywhere. Happy to update our setup if there is possibility for some other convenient configuration.

@jwoLondon
Copy link
Member Author

Ah, OK, that makes sense. I will update my local markdown linting config to conform with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants