Skip to content

Latest commit

 

History

History
123 lines (100 loc) · 2.53 KB

File metadata and controls

123 lines (100 loc) · 2.53 KB
id MDS015
name blank-line-around-fenced-code
status ready
description Fenced code blocks must have a blank line before and after.
category code
nature style
maintainability
markdownlint
id name partial default
MD031
blanks-around-fences
false
true
rumdl
id name partial default
MD031
blanks-around-fences
false
true
mado
id name partial default
MD031
blanks-around-fences
false
true
panache
obsidian-linter
id name partial default
empty-line-around-code-fences
empty-line-around-code-fences
false
false
gomarklint
id name partial default
blanks-around-fences
blanks-around-fences
false
true

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: true

Disable:

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