markdownlint icon indicating copy to clipboard operation
markdownlint copied to clipboard

MD030: Support variable indent in ordered lists for visual alignment

Open skwde opened this issue 11 months ago • 0 comments

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?

skwde avatar Sep 12 '23 11:09 skwde