mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-25 01:05:55 +03:00
[GH-ISSUE #1618] Proposed rules for markdown comment formatting and readability. #2569
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#2569
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 @wwarriner on GitHub (May 29, 2025).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1618
I'd like to propose one or more new rules around the use of HTML comments.
The following would trigger (1):
The following would trigger (2):
The following would trigger (3):
The following would trigger (4):
I understand (4) may be the most contentious. The first three proposals are in line with linters, formatters, and parsers for other languages, and improve readability.
None of these should change page rendering, at least in MkDocs. All of them should be automatically fixable as well. Multiline comments would stay multiline comments, single line comments would stay single line comments, markdown content would be pushed to the appropriate locations away from the comments, and spaces in single line comments would be standardized.
I assume this would also apply to comments which are
markdownlint-*directives. There is an open question of how to disable this/these rules, which might involve comments around comments. I don't think that would break anything, nor why someone would want to do that.