mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-25 17:26:22 +03:00
[GH-ISSUE #503] suggestion; allow 2 consecutive blank lines in front of headings #2259
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#2259
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 @Reissner on GitHub (Feb 23, 2022).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/503
Maybe a good idea to make configurable:
allow 2 blank lines in front of headings.
In this case, the 2 blank lines serve a goal: improve readability.
@DavidAnson commented on GitHub (Feb 23, 2022):
MD022 supports a
lines_abovewhich should do what you want.https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md022
@TheJaredWilcurt commented on GitHub (Feb 25, 2022):
@Reissner Example from my ruleset:
@lud commented on GitHub (Feb 25, 2022):
Generally my manual formatting goes this way:
h2h3or lowerThanks to that the visual separation of the mains sections of the text is more obvious.
Is that something that markdownlint could enforce or do you think it is too specific?
@DavidAnson commented on GitHub (Feb 25, 2022):
That's pretty specialized, but I could imagine adding a property to the existing rule that let you set the number of lines above and below each heading level. That would allow you to require the behavior you want - as well as anything else. I'd want to track this request as a new "enhancement" issue, rather than with this one, so please open it if you'd like.