mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-25 17:26:22 +03:00
[GH-ISSUE #1645] MD005 & MD007 - Add a configurable value for the number of spaces required for nested lists #728
Labels
No labels
bug
enhancement
enhancement
enhancement
fixed in next
fixed in next
fixed in next
new rule
new rule
new rule
pull-request
question
refactoring
refactoring
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/markdownlint#728
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sulphi-fox on GitHub (Jun 20, 2025).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1645
Current State
There is no ability to configure what
markdownlintconsiders valid indentation for a nested list.Desired Feature
It would be great to have a configurable value for what is considered valid indentation for nested lists.
Reasoning
Some markdown renderers, such as the one I am using with mkdocs accept two spaces as valid indentation for nested lists - I am currently unable to use
MD005orMD007as it flags almost all of my lists as invalid / along with the CLI--fixoption, it breaks most of my lists.@DavidAnson commented on GitHub (Jun 20, 2025):
The CommonMark specification explains that list item content must be indented at least as much as the first character of content:
https://spec.commonmark.org/0.31.2/#list-items
For unordered list items, this is typically two spaces whereas for ordered list items, this is typically three spaces (though it can be more for double or triple digits).
This requirement is not specific to nested lists and applies to any content for a list item. As such, I'm not sure if there's anything to do for this issue other than abiding by the specification.
@sulphi-fox commented on GitHub (Jun 20, 2025):
Alright, thanks anyway. I'll keep looking for ways of getting this to work with what I'm using.