MD022 - Headings should be surrounded by blank lines
See original GitHub issueI’d like to configure this warning to:
- Require a preceding empty line (as it already does)
- Not requiring a following empty line
So this should be OK:
something
# Heading
more text
But this should not be OK:
something
# Heading
more text
The docs explain why you must have an empty line before the heading (kramdown), but only cites aesthetics for why you should have an empty line after the heading.
And as a lot of our markdown has no empty line after headings, and I actually like it this way, I’d like to be able to inform Markdownlint about this.
Regards /Johan
Issue Analytics
- State:
- Created 5 years ago
- Reactions:6
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Markdownlint Rules
Rationale: Headings represent the structure of a document and can be confusing when skipped ... MD022 - Headings should be surrounded by blank...
Read more >doc/Rules.md · Gitee 极速下载/markdownlint - Gitee.com
Note: this rule will fire if either side of the heading contains multiple spaces. MD022 - Headings should be surrounded by blank lines....
Read more >markdownlint-cli2-formatter-default/README.md - UNPKG
36, dir/subdir/info.md:1 MD022/blanks-around-headings/blanks-around-headers Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [ ...
Read more >markdownlint-cli2-formatter-pretty - npm
... dir/subdir/info.md:1 MD022/blanks-around-headings/blanks-around-headers Headings should be surrounded by blank lines [Expected: 1; ...
Read more >markdownlint demo - David Anson
Click a violation for information about it or click its line number to ... 16 - MD022 / blanks-around-headings Headings should be surrounded...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Is it possible to configure markdownlinter to force usage of 2 empty lines before headings and 1 after?
Yes, I mention that consequence here: https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md022
Because rules are independent, I don’t see a good way to avoid this.