-
-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add option to allow tight lists in
no-missing-blank-lines
This new feature adds support for allowing missing blank lines between block-level nodes in lists, through passing `{exceptTightLists: true}` to `no-missing-blank-lines` (default: false). Closes GH-85.
- Loading branch information
Showing
2 changed files
with
75 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1790,7 +1790,11 @@ mailto:[email protected] | |
|
||
## `no-missing-blank-lines` | ||
|
||
Warn for missing blank lines before a block node. | ||
Warn when missing blank lines before a block node. | ||
|
||
This rule can be configured to allow tight list items | ||
without blank lines between their contents through | ||
`exceptTightLists: true` (default: false). | ||
|
||
When this rule is turned on, the following file | ||
`valid.md` is ok: | ||
|
@@ -1799,6 +1803,12 @@ When this rule is turned on, the following file | |
# Foo | ||
|
||
## Bar | ||
|
||
- Paragraph | ||
|
||
+ List. | ||
|
||
Paragraph. | ||
``` | ||
|
||
When this rule is turned on, the following file | ||
|
@@ -1807,6 +1817,29 @@ When this rule is turned on, the following file | |
```markdown | ||
# Foo | ||
## Bar | ||
|
||
- Paragraph | ||
+ List. | ||
|
||
Paragraph. | ||
``` | ||
|
||
```text | ||
2:1-2:7: Missing blank line before block node | ||
5:3-5:10: Missing blank line before block node | ||
``` | ||
|
||
When this rule is `{ exceptTightLists: true }`, the following file | ||
`tight.md` is **not** ok: | ||
|
||
```markdown | ||
# Foo | ||
## Bar | ||
|
||
- Paragraph | ||
+ List. | ||
|
||
Paragraph. | ||
``` | ||
|
||
```text | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters