mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-25 09:16:02 +03:00
[GH-ISSUE #689] False positive MD046 for long footnotes? #511
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#511
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 @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:...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:
Thank you!
@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
@max-sixty commented on GitHub (Dec 26, 2022):
Thanks — that does help — but we get a new set of errors:
Regardless, this doesn't seem like an issue with this library specifically, so I'll close this issue.
Thanks!