mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-25 09:16:02 +03:00
[GH-ISSUE #200] Disable MD031 (space around code blocks) for lists? #174
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#174
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 @borekb on GitHub (Jun 16, 2019).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/200
The "MD031 – Fenced code blocks should be surrounded by blank lines" rule is invoked also for code blocks that are inside lists. (It was even reported as a bug when it wasn't: #189.) However, I'm not sure that it's desired because adding a blank line actually influences how the other
<li>elements are treated (with a blank line, all of them are wrapped in an additional<p>tag).Compare:
Example without a blank line
Source:
Output:
Example with a blank line
Source:
Output:
List
with
code block:
I'd appreciate if there was a way to disable MD031 for lists.
@DavidAnson commented on GitHub (Jun 16, 2019):
Good idea!
@borekb commented on GitHub (Sep 5, 2019):
Thanks for implementing this! For anyone reading this, since 0.16.0, this config resolves it:
See
github.com/DavidAnson/markdownlint@c5b74d22b9.