[GH-ISSUE #967] MD030: Support variable indent in ordered lists for visual alignment #2421

Open
opened 2026-03-07 20:07:36 +03:00 by kerem · 0 comments
Owner

Originally created by @skwde on GitHub (Sep 12, 2023).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/967

I have following MD030 setting in my .markdownlint.yaml

# MD030/list-marker-space - Spaces after list markers
MD030:
  # Spaces for single-line unordered list items
  ul_single: 3
  # Spaces for single-line ordered list items
  ol_single: 2
  # Spaces for multi-line unordered list items
  ul_multi: 3
  # Spaces for multi-line ordered list items
  ol_multi: 2

Following "long" ordered list

1.  a
2.  b
3.  c
4.  d
5.  e
6.  f
7.  g
8.  h
9.  i
10. j

gives the warning MD030/list-marker-space: Spaces after list markers [Expected: 2; Actual: 1]markdownlint[MD030](https://github.com/DavidAnson/markdownlint/blob/v0.29.0/doc/md030.md) for the line 10. j.

The make the linter happy I have to change above list to

1.  a
2.  b
3.  c
4.  d
5.  e
6.  f
7.  g
8.  h
9.  i
10.  j

i.e. add an additional space after 10..

Is it possible to make the ol_single and ol_multi settings dynamic in the sense of Start item text at character 5?

Maybe with an alternative setting like first_item_text_char: 5 which overwrites the ones not explicitly set?

Originally created by @skwde on GitHub (Sep 12, 2023). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/967 I have following `MD030` setting in my `.markdownlint.yaml` ```yml # MD030/list-marker-space - Spaces after list markers MD030: # Spaces for single-line unordered list items ul_single: 3 # Spaces for single-line ordered list items ol_single: 2 # Spaces for multi-line unordered list items ul_multi: 3 # Spaces for multi-line ordered list items ol_multi: 2 ``` Following "long" ordered list ```markdown 1. a 2. b 3. c 4. d 5. e 6. f 7. g 8. h 9. i 10. j ``` gives the warning `MD030/list-marker-space: Spaces after list markers [Expected: 2; Actual: 1]markdownlint[MD030](https://github.com/DavidAnson/markdownlint/blob/v0.29.0/doc/md030.md)` for the line `10. j`. The make the linter happy I have to change above list to ```markdown 1. a 2. b 3. c 4. d 5. e 6. f 7. g 8. h 9. i 10. j ``` i.e. add an additional space after `10.`. Is it possible to make the `ol_single` and `ol_multi` settings dynamic in the sense of `Start item text at character 5`? Maybe with an alternative setting like `first_item_text_char: 5` which overwrites the ones not explicitly set?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/markdownlint#2421
No description provided.