markdownlint/doc-build/md046.md

684 B

This rule is triggered when unwanted or different code block styles are used in the same document.

In the default configuration this rule reports a violation for the following document:

Some text.

    # Indented code

More text.

```ruby
# Fenced code
```

More text.

To fix violations of this rule, use a consistent style (either indenting or code fences).

The specified style can be specific (fenced, indented) or simply require that usage be consistent within the document (consistent).

Rationale: Consistent formatting makes it easier to understand a document.