2022-10-30 15:13:19 -07:00
|
|
|
# `MD048` - Code fence style
|
2022-10-29 23:21:45 -07:00
|
|
|
|
2022-10-30 15:13:19 -07:00
|
|
|
Tags: `code`
|
2022-10-29 23:21:45 -07:00
|
|
|
|
2022-10-30 15:13:19 -07:00
|
|
|
Aliases: `code-fence-style`
|
2022-10-29 23:21:45 -07:00
|
|
|
|
|
|
|
Parameters:
|
|
|
|
|
|
|
|
* `style`: Code fence style (`string`, default `consistent`, values `backtick`/`consistent`/`tilde`)
|
|
|
|
|
|
|
|
This rule is triggered when the symbols used in the document for fenced code
|
|
|
|
blocks do not match the configured code fence style:
|
|
|
|
|
|
|
|
````markdown
|
|
|
|
```ruby
|
|
|
|
# Fenced code
|
|
|
|
```
|
|
|
|
|
|
|
|
~~~ruby
|
|
|
|
# Fenced code
|
|
|
|
~~~
|
|
|
|
````
|
|
|
|
|
|
|
|
To fix this issue, use the configured code fence style throughout the
|
|
|
|
document:
|
|
|
|
|
|
|
|
````markdown
|
|
|
|
```ruby
|
|
|
|
# Fenced code
|
|
|
|
```
|
|
|
|
|
|
|
|
```ruby
|
|
|
|
# Fenced code
|
|
|
|
```
|
|
|
|
````
|
|
|
|
|
|
|
|
The configured list style can be a specific symbol to use (backtick, tilde), or
|
|
|
|
can require that usage be consistent within the document.
|
|
|
|
|
|
|
|
Rationale: Consistent formatting makes it easier to understand a document.
|