Code block style Open
curl http://localhost:3000/users -X POST -H "Content-Type: application/json" -d '{"fullName": "Michal Jackson", "emailAddress": "michale@gmail.com"}'
- Create a ticketCreate a ticket
- Exclude checks
Multiple consecutive blank lines Open
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
MD012 - Multiple consecutive blank lines
Tags: whitespace, blank_lines
Aliases: no-multiple-blanks
This rule is triggered when there are multiple consecutive blank lines in the document:
Some text here
Some more text here
To fix this, delete the offending lines:
Some text here
Some more text here
Note: this rule will not be triggered if there are multiple consecutive blank lines inside code blocks.
Code block style Open
$ RAILS_MASTER_KEY=289e1431050b365b62bb5917acabcc53 rails credentials:show
- Create a ticketCreate a ticket
- Exclude checks
Multiple headers with the same content Open
#### Response
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
MD024 - Multiple headers with the same content
Tags: headers
Aliases: no-duplicate-header
Parameters: allowdifferentnesting (boolean; default false)
This rule is triggered if there are multiple headers in the document that have the same text:
# Some text
## Some text
To fix this, ensure that the content of each header is different:
# Some text
## Some more text
Rationale: Some markdown parses generate anchors for headers based on the header name, and having headers with the same content can cause problems with this.
If the parameter allow_different_nesting
is set to true
, header duplication
under different nesting is allowed, like it usually happens in change logs:
# Change log
## 2.0.0
### Bug fixes
### Features
## 1.0.0
### Bug fixes
Code block style Open
$ rails runner 'puts Env.APP_CONFIG("default")'
- Create a ticketCreate a ticket
- Exclude checks
Code block style Open
$ RAILS_MASTER_KEY=289e1431050b365b62bb5917acabcc53 APP_CONFIG=envVar rails runner 'puts Env.APP_CONFIG("default")'
- Create a ticketCreate a ticket
- Exclude checks
Code block style Open
$ RAILS_MASTER_KEY=289e1431050b365b62bb5917acabcc53 rails runner 'puts Env.APP_CONFIG'
- Create a ticketCreate a ticket
- Exclude checks
Code block style Open
$ APP_CONFIG=envVar rails runner 'puts Env.APP_CONFIG("default")'
- Create a ticketCreate a ticket
- Exclude checks
Line length Open
$ RAILS_MASTER_KEY=289e1431050b365b62bb5917acabcc53 APP_CONFIG=envVar rails runner 'puts Env.APP_CONFIG("default")'
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
MD013 - Line length
Tags: line_length
Aliases: line-length Parameters: linelength, codeblocks, tables (number; default 80, boolean; default true)
This rule is triggered when there are lines that are longer than the configured line length (default: 80 characters). To fix this, split the line up into multiple lines.
This rule has an exception where there is no whitespace beyond the configured line length. This allows you to still include items such as long URLs without being forced to break them in the middle.
You also have the option to exclude this rule for code blocks and tables. To
do this, set the code_blocks
and/or tables
parameters to false.
Code blocks are included in this rule by default since it is often a requirement for document readability, and tentatively compatible with code rules. Still, some languages do not lend themselves to short lines.
Code block style Open
rails generate scaffold User full_name:string email_address:string
- Create a ticketCreate a ticket
- Exclude checks
Code block style Open
$ RAILS_MASTER_KEY=289e1431050b365b62bb5917acabcc53 rails runner 'puts Env.APP_CONFIG("default")'
- Create a ticketCreate a ticket
- Exclude checks
Multiple headers with the same content Open
#### Request
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
MD024 - Multiple headers with the same content
Tags: headers
Aliases: no-duplicate-header
Parameters: allowdifferentnesting (boolean; default false)
This rule is triggered if there are multiple headers in the document that have the same text:
# Some text
## Some text
To fix this, ensure that the content of each header is different:
# Some text
## Some more text
Rationale: Some markdown parses generate anchors for headers based on the header name, and having headers with the same content can cause problems with this.
If the parameter allow_different_nesting
is set to true
, header duplication
under different nesting is allowed, like it usually happens in change logs:
# Change log
## 2.0.0
### Bug fixes
### Features
## 1.0.0
### Bug fixes
Line length Open
curl http://localhost:3000/users -X POST -H "Content-Type: application/json" -d '{"fullName": "Michal Jackson", "emailAddress": "michale@gmail.com"}'
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
MD013 - Line length
Tags: line_length
Aliases: line-length Parameters: linelength, codeblocks, tables (number; default 80, boolean; default true)
This rule is triggered when there are lines that are longer than the configured line length (default: 80 characters). To fix this, split the line up into multiple lines.
This rule has an exception where there is no whitespace beyond the configured line length. This allows you to still include items such as long URLs without being forced to break them in the middle.
You also have the option to exclude this rule for code blocks and tables. To
do this, set the code_blocks
and/or tables
parameters to false.
Code blocks are included in this rule by default since it is often a requirement for document readability, and tentatively compatible with code rules. Still, some languages do not lend themselves to short lines.
Fenced code blocks should be surrounded by blank lines Open
```json
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
MD031 - Fenced code blocks should be surrounded by blank lines
Tags: code, blank_lines
Aliases: blanks-around-fences
This rule is triggered when fenced code blocks are either not preceded or not followed by a blank line:
Some text
```
Code block
```
```
Another code block
```
Some more text
To fix this, ensure that all fenced code blocks have a blank line both before and after (except where the block is at the beginning or end of the document):
Some text
```
Code block
```
```
Another code block
```
Some more text
Rationale: Aside from aesthetic reasons, some parsers, including kramdown, will not parse fenced code blocks that don't have blank lines before and after them.
Code block style Open
rails generate scaffold post post_content:text user_id:integer
- Create a ticketCreate a ticket
- Exclude checks
Code block style Open
bin/rails db:migrate RAILS_ENV=development
- Create a ticketCreate a ticket
- Exclude checks
Fenced code blocks should be surrounded by blank lines Open
```json
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
MD031 - Fenced code blocks should be surrounded by blank lines
Tags: code, blank_lines
Aliases: blanks-around-fences
This rule is triggered when fenced code blocks are either not preceded or not followed by a blank line:
Some text
```
Code block
```
```
Another code block
```
Some more text
To fix this, ensure that all fenced code blocks have a blank line both before and after (except where the block is at the beginning or end of the document):
Some text
```
Code block
```
```
Another code block
```
Some more text
Rationale: Aside from aesthetic reasons, some parsers, including kramdown, will not parse fenced code blocks that don't have blank lines before and after them.