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

MD030: Support variable indent in ordered lists for visual alignment #967

Open
skwde opened this issue Sep 12, 2023 · 0 comments
Open

MD030: Support variable indent in ordered lists for visual alignment #967

skwde opened this issue Sep 12, 2023 · 0 comments

Comments

@skwde
Copy link

skwde commented Sep 12, 2023

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?

@DavidAnson DavidAnson changed the title MD030 and high numbers in ordered lists MD030: Support variable indent high numbers in ordered lists Sep 12, 2023
@DavidAnson DavidAnson changed the title MD030: Support variable indent high numbers in ordered lists MD030: Support variable indent in ordered lists for visual alignment Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants