Skip to content

Latest commit

 

History

History
80 lines (59 loc) · 1.28 KB

File metadata and controls

80 lines (59 loc) · 1.28 KB
id MDS015
name blank-line-around-fenced-code
status ready
description Fenced code blocks must have a blank line before and after.

MDS015: blank-line-around-fenced-code

Fenced code blocks must have a blank line before and after.

  • ID: MDS015
  • Name: blank-line-around-fenced-code
  • Status: ready
  • Default: enabled
  • Fixable: yes
  • Implementation: source
  • Category: code

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