[GH-ISSUE #689] False positive MD046 for long footnotes? #511

Closed
opened 2026-03-03 01:27:34 +03:00 by kerem · 2 comments
Owner

Originally created by @max-sixty on GitHub (Dec 26, 2022).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/689

I had a search for this in the existing issues but couldn't find anything. https://github.com/DavidAnson/markdownlint/issues/599 was related but a different error.

In this file: github.com/PRQL/prql@ee7679fca7/DEVELOPMENT.md (L33), we get:

DEVELOPMENT.md:33 MD046/code-block-style Code block style [Expected: fenced; Actual: indented]

...but it's not a code block, it's indented to make it part of the footnote. Is there a better way to make a multiline footnote?

Here's a screenshot of the md and the result; the location of the error is highlighted:


image
image

Thank you!

Originally created by @max-sixty on GitHub (Dec 26, 2022). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/689 I had a search for this in the existing issues but couldn't find anything. https://github.com/DavidAnson/markdownlint/issues/599 was related but a different error. In this file: https://github.com/PRQL/prql/blob/ee7679fca744e01df5e52626bdec2eb66739e782/DEVELOPMENT.md?plain=1#L33, we get: ``` DEVELOPMENT.md:33 MD046/code-block-style Code block style [Expected: fenced; Actual: indented] ``` ...but it's not a code block, it's indented to make it part of the footnote. Is there a better way to make a multiline footnote? Here's a screenshot of the md and the result; the location of the error is highlighted: --- <img width="780" alt="image" src="https://user-images.githubusercontent.com/5635139/209575238-1b4b45b1-fea7-4162-a8e1-18cdb3294db3.png"> --- <img width="1227" alt="image" src="https://user-images.githubusercontent.com/5635139/209575199-3ab59432-d16f-4a15-9cbe-499d3a1c0ccd.png"> --- Thank you!
kerem 2026-03-03 01:27:34 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@DavidAnson commented on GitHub (Dec 26, 2022):

By CommonMark strict parsing rules, that warning is correct as seen by the parser:
http://markdown-it.github.io/#md3=%7B%22source%22%3A%22%23%20Issue%20689%5Cn%5CnText%5B%5E5%5D%5Cn%5Cn%60%60%60text%5CnCode%5Cn%60%60%60%5Cn%5Cn%5B%5E5%5D%3A%5Cn%20%20%20%20Text%5Cn%5Cn%20%20%20%20-%20Item%5Cn%22%2C%22defaults%22%3A%7B%22html%22%3Afalse%2C%22xhtmlOut%22%3Afalse%2C%22breaks%22%3Afalse%2C%22langPrefix%22%3A%22language-%22%2C%22linkify%22%3Atrue%2C%22typographer%22%3Atrue%2C%22_highlight%22%3Atrue%2C%22_strict%22%3Atrue%2C%22_view%22%3A%22html%22%7D%7D

However, disabling strict mode behaves as you wish at the parser layer. I suspect the footnote gets handled by a markdown-it plugin which you could also include when linting and should silence the warning. (I can’t verify that from my phone right now, but think I’ve tried this before.)

PS: Probably this plugin: https://www.npmjs.com/package/markdown-it-footnote

<!-- gh-comment-id:1365395407 --> @DavidAnson commented on GitHub (Dec 26, 2022): By CommonMark strict parsing rules, that warning is correct as seen by the parser: <http://markdown-it.github.io/#md3=%7B%22source%22%3A%22%23%20Issue%20689%5Cn%5CnText%5B%5E5%5D%5Cn%5Cn%60%60%60text%5CnCode%5Cn%60%60%60%5Cn%5Cn%5B%5E5%5D%3A%5Cn%20%20%20%20Text%5Cn%5Cn%20%20%20%20-%20Item%5Cn%22%2C%22defaults%22%3A%7B%22html%22%3Afalse%2C%22xhtmlOut%22%3Afalse%2C%22breaks%22%3Afalse%2C%22langPrefix%22%3A%22language-%22%2C%22linkify%22%3Atrue%2C%22typographer%22%3Atrue%2C%22_highlight%22%3Atrue%2C%22_strict%22%3Atrue%2C%22_view%22%3A%22html%22%7D%7D> However, disabling strict mode behaves as you wish at the parser layer. I suspect the footnote gets handled by a markdown-it plugin which you could also include when linting and should silence the warning. (I can’t verify that from my phone right now, but think I’ve tried this before.) PS: Probably this plugin: <https://www.npmjs.com/package/markdown-it-footnote>
Author
Owner

@max-sixty commented on GitHub (Dec 26, 2022):

Thanks — that does help — but we get a new set of errors:

markdownlint-cli2 v0.5.1 (markdownlint v0.26.2)
Finding: DEVELOPMENT.md
Linting: 1 file(s)
Summary: 10 error(s)
DEVELOPMENT.md:33:1 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 4]
DEVELOPMENT.md:37:1 MD007/ul-indent Unordered list indentation [Expected: 2; Actual: 6]
DEVELOPMENT.md:38:1 MD007/ul-indent Unordered list indentation [Expected: 2; Actual: 6]
DEVELOPMENT.md:39:1 MD007/ul-indent Unordered list indentation [Expected: 2; Actual: 6]
DEVELOPMENT.md:41:1 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 4]
DEVELOPMENT.md:154:1 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 4]
DEVELOPMENT.md:156:1 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 4]
DEVELOPMENT.md:159:1 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 4]
DEVELOPMENT.md:162:1 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 4]
DEVELOPMENT.md:166:1 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 4]

Regardless, this doesn't seem like an issue with this library specifically, so I'll close this issue.

Thanks!

<!-- gh-comment-id:1365471821 --> @max-sixty commented on GitHub (Dec 26, 2022): Thanks — that does help — but we get a new set of errors: ``` markdownlint-cli2 v0.5.1 (markdownlint v0.26.2) Finding: DEVELOPMENT.md Linting: 1 file(s) Summary: 10 error(s) DEVELOPMENT.md:33:1 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 4] DEVELOPMENT.md:37:1 MD007/ul-indent Unordered list indentation [Expected: 2; Actual: 6] DEVELOPMENT.md:38:1 MD007/ul-indent Unordered list indentation [Expected: 2; Actual: 6] DEVELOPMENT.md:39:1 MD007/ul-indent Unordered list indentation [Expected: 2; Actual: 6] DEVELOPMENT.md:41:1 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 4] DEVELOPMENT.md:154:1 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 4] DEVELOPMENT.md:156:1 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 4] DEVELOPMENT.md:159:1 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 4] DEVELOPMENT.md:162:1 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 4] DEVELOPMENT.md:166:1 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 4] ``` Regardless, this doesn't seem like an issue with this library specifically, so I'll close this issue. Thanks!
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#511
No description provided.