mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-21 21:30:47 +02:00
Add support for "markdownlint-configure-file" inline comments (fixes #264).
This commit is contained in:
parent
dd66a33d75
commit
6ce426cf88
7 changed files with 183 additions and 56 deletions
27
README.md
27
README.md
|
@ -196,6 +196,33 @@ the following syntax is supported:
|
|||
|
||||
This can be used to "hide" `markdownlint` comments at the bottom of a file.
|
||||
|
||||
In cases where it is desirable to change the configuration of one or more rules
|
||||
for a file, the following more advanced syntax is supported:
|
||||
|
||||
* Confiure: `<!-- markdownlint-configure-file { options.config JSON } -->`
|
||||
|
||||
For example:
|
||||
|
||||
```markdown
|
||||
<!-- markdownlint-configure-file { "MD013": { "line_length": 70 } } -->
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```markdown
|
||||
<!-- markdownlint-configure-file
|
||||
{
|
||||
"hr-style": {
|
||||
"style": "---"
|
||||
},
|
||||
"no-trailing-spaces": false
|
||||
}
|
||||
-->
|
||||
```
|
||||
|
||||
These changes apply to the entire file regardless of where the comment is
|
||||
located. Multiple such comments (if present) are applied top-to-bottom.
|
||||
|
||||
## API
|
||||
|
||||
### Linting
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue