[GH-ISSUE #318] False positives MD032 & MD007 on combinations of definition list and (un)ordered list #271

Closed
opened 2026-03-03 01:25:18 +03:00 by kerem · 1 comment
Owner

Originally created by @exavolt on GitHub (Aug 15, 2020).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/318

In VSCode:
Screen Shot 2020-08-15 at 11 54 47

Rendered by Hugo as expected:
Screen Shot 2020-08-15 at 11 55 12

The only way to combine a definition list with (un)ordered list is to put the first item at the same line as the colon (which translates to <dd>), which triggers MD032. In turn, it requires the subsequent items to be indented too, which triggers MD007.

The expectation is that it should be treated similarly to nested lists.

This won't trigger any of those rules:

- One
  - One of one
  - Two of one
Originally created by @exavolt on GitHub (Aug 15, 2020). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/318 In VSCode: <img width="412" alt="Screen Shot 2020-08-15 at 11 54 47" src="https://user-images.githubusercontent.com/77626/90305549-39b57f00-deee-11ea-84a2-38d337ea162c.png"> Rendered by Hugo as expected: <img width="462" alt="Screen Shot 2020-08-15 at 11 55 12" src="https://user-images.githubusercontent.com/77626/90305552-44701400-deee-11ea-8df4-41dbd27b1a75.png"> The only way to combine a definition list with (un)ordered list is to put the first item at the same line as the colon (which translates to `<dd>`), which triggers MD032. In turn, it requires the subsequent items to be indented too, which triggers MD007. The expectation is that it should be treated similarly to nested lists. This won't trigger any of those rules: ``` - One - One of one - Two of one ```
kerem 2026-03-03 01:25:18 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@DavidAnson commented on GitHub (Aug 15, 2020):

Definition lists are not part of the CommonMark specification and not currently supported. More context in this comment (the rest of that issue is a bit muddled): https://github.com/DavidAnson/markdownlint/issues/286#issuecomment-624454213

<!-- gh-comment-id:674352090 --> @DavidAnson commented on GitHub (Aug 15, 2020): Definition lists are not part of the CommonMark specification and not currently supported. More context in this comment (the rest of that issue is a bit muddled): https://github.com/DavidAnson/markdownlint/issues/286#issuecomment-624454213
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#271
No description provided.