mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-01-27 17:36:10 +01:00
Add noInlineConfig option to disable inline config comments.
This commit is contained in:
parent
ac6b80b42a
commit
614ac8fa23
4 changed files with 110 additions and 45 deletions
67
README.md
67
README.md
|
|
@ -206,34 +206,6 @@ Example:
|
|||
}
|
||||
```
|
||||
|
||||
##### options.frontMatter
|
||||
|
||||
Type: `RegExp`
|
||||
|
||||
Matches any [front matter](https://jekyllrb.com/docs/frontmatter/) found at the
|
||||
beginning of a file.
|
||||
|
||||
Some Markdown content begins with metadata; the default `RegExp` for this option
|
||||
ignores common forms of "front matter". To match differently, specify a custom
|
||||
`RegExp` or use the value `null` to disable the feature.
|
||||
|
||||
Note: Matches must occur at the start of the file.
|
||||
|
||||
Default:
|
||||
|
||||
```js
|
||||
/^---$[^]*?^---$(\r\n|\r|\n)/m
|
||||
```
|
||||
|
||||
Ignores:
|
||||
|
||||
```text
|
||||
---
|
||||
layout: post
|
||||
title: Title
|
||||
---
|
||||
```
|
||||
|
||||
##### options.config
|
||||
|
||||
Type: `Object` mapping `String` to `Boolean | Object`
|
||||
|
|
@ -318,6 +290,45 @@ var options = {
|
|||
};
|
||||
```
|
||||
|
||||
##### options.frontMatter
|
||||
|
||||
Type: `RegExp`
|
||||
|
||||
Matches any [front matter](https://jekyllrb.com/docs/frontmatter/) found at the
|
||||
beginning of a file.
|
||||
|
||||
Some Markdown content begins with metadata; the default `RegExp` for this option
|
||||
ignores common forms of "front matter". To match differently, specify a custom
|
||||
`RegExp` or use the value `null` to disable the feature.
|
||||
|
||||
Note: Matches must occur at the start of the file.
|
||||
|
||||
Default:
|
||||
|
||||
```js
|
||||
/^---$[^]*?^---$(\r\n|\r|\n)/m
|
||||
```
|
||||
|
||||
Ignores:
|
||||
|
||||
```text
|
||||
---
|
||||
layout: post
|
||||
title: Title
|
||||
---
|
||||
```
|
||||
|
||||
##### options.noInlineConfig
|
||||
|
||||
Type: `Boolean`
|
||||
|
||||
Disables the use of HTML comments like `<!-- markdownlint-disable -->` to toggle
|
||||
rules within the body of Markdown content.
|
||||
|
||||
By default, properly-formatted inline comments can be used to create exceptions
|
||||
for parts of a document. Setting `noInlineConfig` to `true` ignores all such
|
||||
comments.
|
||||
|
||||
##### options.resultVersion
|
||||
|
||||
Type: `Number`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue