mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-25 09:16:02 +03:00
[GH-ISSUE #546] MD022: Split into two separate configurations to allow enforcing only one of lines_above/lines_below #446
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#446
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 @MicahZoltu on GitHub (Aug 2, 2022).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/546
https://github.com/DavidAnson/markdownlint/blob/main/README.md#md022---headings-should-be-surrounded-by-blank-lines
Unless I'm missing something, it doesn't appear I can configure markdownlint to enforce
lines_abovewhile not enforcinglines_below. IIUC, I can only either turn the whole rule off, or configure linting on both. I would like to enforcelines_abovebut not enforcelines_below.@DavidAnson commented on GitHub (Aug 2, 2022):
Can you explain more, please? It sounds like you want to ensure there is exactly one line above the heading, but do not care if there are 0, 1, 10, etc. lines below it and if that amount varies within the same file? Why?
@MicahZoltu commented on GitHub (Aug 2, 2022):
This is correct. There are 3 reasons one may want to do this:
lines_aboveis necessary for maximum rendering engine compatibility whilelines_belowis not.