MDS015: blank-line-around-fenced-code
Fenced code blocks must have a blank line before and after.
# Config
Enable:
rules:
blank-line-around-fenced-code: trueDisable:
rules:
blank-line-around-fenced-code: false# Examples
# Bad
# Title
Content here.
```go
fmt.Println("hello")
```# Good
# Title
```go
fmt.Println("hello")
```
Content here.# Diagnostics
| Message | Condition |
|---|---|
fenced code block should be preceded by a blank line | Previous line is not blank |
fenced code block should be followed by a blank line | Next line after closing fence is not blank |
# Meta-Information
- ID: MDS015
- Name:
blank-line-around-fenced-code - Status: ready
- Default: enabled
- Fixable: yes
- Implementation: source
- Category: code
- markdownlint: MD031 (blanks-around-fences)
- rumdl: MD031 (blanks-around-fences)
- mado: MD031 (blanks-around-fences)
- obsidian-linter: empty-line-around-code-fences
- gomarklint: blanks-around-fences