mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-26 01:36:03 +03:00
[GH-ISSUE #531] MD029 ordered list items: combining two modes #434
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#434
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 @iamtodor on GitHub (Jun 5, 2022).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/531
Following this answer https://github.com/DavidAnson/markdownlint/issues/45#issuecomment-277859620
Does it mean that I am not able to combine both types?
For instance, I have the following project structure
For some reason I'd like in
task1/README.mdto follow an unordered list, however intask2/README.mdI need to have an ordered list.Is it possible to combine both checks? I also took a look at https://github.com/DavidAnson/markdownlint/issues/45 but I didn't find
@DavidAnson commented on GitHub (Jun 5, 2022):
You can apply different configuration for each file via
--config.Or you can customize within a file via
<!-- markdownlint-configure-file { JSON } -->.@iamtodor commented on GitHub (Jun 5, 2022):
@DavidAnson in this case I need to mention each
README.mdfile in the config, right?@iamtodor commented on GitHub (Jun 5, 2022):
This example
Would not pass in any case, right?
@DavidAnson commented on GitHub (Jun 5, 2022):
This is an example of configuring within a file: https://raw.githubusercontent.com/DavidAnson/markdownlint/main/test/inline-configure-file-multiple-lines.md
None of the default settings would encourage that extra space in front of the unordered list item markers.
@iamtodor commented on GitHub (Jun 5, 2022):
@DavidAnson
None of the default settings would encourage that extra space in front of the unordered list item markersI have the feeling that I use this tool in the wrong way, do I?I found that if I need to create an inner list I should use 4 spaces here https://stackoverflow.com/a/37594372/5151861 and https://www.markdownguide.org/basic-syntax/#ordered-lists ?
@DavidAnson commented on GitHub (Jun 5, 2022):
Per the specification, content of a list item should match that of the list item marker and the spaces that follow. Typically, that means aligning everything to match the start of content of the first line. There is no magic number like 3 or 4 because markers can be longer or extra spaces may be used. There are other approaches that can be used, but this is the default and what this tool expects.
https://spec.commonmark.org/0.30/#list-items