[GH-ISSUE #1346] Docs: Explain the meaning of "consistent" for rules that support that style #2517

Closed
opened 2026-03-07 20:08:30 +03:00 by kerem · 0 comments
Owner

Originally created by @ferrarimarco on GitHub (Sep 5, 2024).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1346

In #173, there's a useful explanation about how MD004 works when set to its default (consistent):

[..] By default, MD004 assumes the first list item it finds uses the list marker style you want for the entire document. You could change the other list(s) to use ‘-‘ and this warning should go away. Or you could disable MD004 if you like how your document is now.

This explanation is missing from both Rules.md and from md004.md, although it might be implied by reading the first example.

I had to dig a bit in the issue tracker and in code to understand how that worked.

Maybe we can add it to the MD004 docs?

Thanks!

Originally created by @ferrarimarco on GitHub (Sep 5, 2024). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1346 In [#173](https://github.com/DavidAnson/markdownlint/issues/173#issuecomment-474648591), there's a useful explanation about how MD004 works when set to its default (`consistent`): >[..] By default, MD004 assumes the first list item it finds uses the list marker style you want for the entire document. You could change the other list(s) to use ‘-‘ and this warning should go away. Or you could disable MD004 if you like how your document is now. This explanation is missing from both [Rules.md](https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md004---unordered-list-style) and from [md004.md](https://github.com/DavidAnson/markdownlint/blob/main/doc/md004.md), although it might be implied by reading the first example. I had to dig a bit in the issue tracker and in code to understand how that worked. Maybe we can add it to the MD004 docs? Thanks!
kerem 2026-03-07 20:08:30 +03:00
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#2517
No description provided.