mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-26 01:36:03 +03:00
[GH-ISSUE #527] MD031: Make rule configurable with lines above/after like MD022 #431
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#431
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 @cjcarpen on GitHub (May 20, 2022).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/527
MD031 - Fenced code blocks should be surrounded by blank lines notes in the rationale:
However, we use a Markdown parser with Kramdown-style attributes, which for block-level elements are applied on the line immediately after the block. For example, to apply an ID:
Because of this, we'd like to be able to configure MD031 with
lines_aboveandlines_belowmuch like you can for MD022, Headings should be surrounded by blank lines. This would allow us to enable the MD031 rule to enforce an empty line above code blocks while still supporting Kramdown-style attributes on code blocks.@fulldecent commented on GitHub (Sep 10, 2024):
This also affects:
MD058/blanks-around-tables
And FYI, kramdown supports these attributes before or after the content:
Try it yourself at:
https://kramdown.electricbook.works/