[GH-ISSUE #1679] MD007: How to format list in a footnote #2582

Closed
opened 2026-03-07 20:09:04 +03:00 by kerem · 1 comment
Owner

Originally created by @asponring on GitHub (Jul 15, 2025).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1679

I am upgrading markdownlint-cli 0.33 to 0.45, thereby going from markdownlint 0.27 to 0.38. Markdownlint is now flagging something that was working previously. I have a footnote that is formatted according to GitHub's style:

Paragraph text.[^note]

[^note]: Footnote and now list:

    * Item 1
    * Item 2

The linter says:

test.md:5:1 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 4]
test.md:6:1 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 4]

The footnote renders correctly on GitHub, but if I follow the linter's recommendation and go to 0 indentation, the list will no longer be part of the footnote and show up as regular text. The linter won't accept 2 spaces either. And if I remove the blank line above the list, I get flagged for MD032.

Any recommendation on how I should reformat this? Thank you!

Originally created by @asponring on GitHub (Jul 15, 2025). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1679 I am upgrading markdownlint-cli 0.33 to 0.45, thereby going from markdownlint 0.27 to 0.38. Markdownlint is now flagging something that was working previously. I have a footnote that is formatted according to [GitHub's style](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#footnotes): ``` Paragraph text.[^note] [^note]: Footnote and now list: * Item 1 * Item 2 ``` The linter says: ``` test.md:5:1 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 4] test.md:6:1 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 4] ``` The footnote renders correctly on GitHub, but if I follow the linter's recommendation and go to 0 indentation, the list will no longer be part of the footnote and show up as regular text. The linter won't accept 2 spaces either. And if I remove the blank line above the list, I get flagged for MD032. Any recommendation on how I should reformat this? Thank you!
kerem 2026-03-07 20:09:04 +03:00
Author
Owner

@DavidAnson commented on GitHub (Jul 15, 2025):

It looks like content must be indented starting at four spaces to be considered part of a footnote and this rule is not taking that into account.

https://github.com/micromark/micromark-extension-gfm-footnote?tab=readme-ov-file#syntax

https://dlaa.me/markdownlint/#%25m%23%20Issue%201679%0A%0AParagraph%20text.%5B%5Enote%5D%0A%0A%5B%5Enote%5D%3A%20Footnote%20and%20now%20list%3A%0A%0A%20%20%20%20*%20Item%201%0A%20%20%20%20*%20Item%202%0A

<!-- gh-comment-id:3075825048 --> @DavidAnson commented on GitHub (Jul 15, 2025): It looks like content must be indented starting at four spaces to be considered part of a footnote and this rule is not taking that into account. https://github.com/micromark/micromark-extension-gfm-footnote?tab=readme-ov-file#syntax https://dlaa.me/markdownlint/#%25m%23%20Issue%201679%0A%0AParagraph%20text.%5B%5Enote%5D%0A%0A%5B%5Enote%5D%3A%20Footnote%20and%20now%20list%3A%0A%0A%20%20%20%20*%20Item%201%0A%20%20%20%20*%20Item%202%0A
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#2582
No description provided.