mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-05 03:26:53 +00:00
Default --no-markdown-linebreak-ext for trailing-whitespace
This commit is contained in:
parent
78b24438db
commit
99453a5366
3 changed files with 40 additions and 89 deletions
|
|
@ -97,10 +97,10 @@ Add this to your `.pre-commit-config.yaml`
|
|||
- `requirements-txt-fixer` - Sorts entries in requirements.txt and removes incorrect entry for `pkg-resources==0.0.0`
|
||||
- `sort-simple-yaml` - Sorts simple YAML files which consist only of top-level keys, preserving comments and blocks.
|
||||
- `trailing-whitespace` - Trims trailing whitespace.
|
||||
- Markdown linebreak trailing spaces preserved for `.md` and`.markdown`;
|
||||
use `args: ['--markdown-linebreak-ext=txt,text']` to add other extensions,
|
||||
`args: ['--markdown-linebreak-ext=*']` to preserve them for all files,
|
||||
or `args: ['--no-markdown-linebreak-ext']` to disable and always trim.
|
||||
- To preserve Markdown [hard linebreaks](https://github.github.com/gfm/#hard-line-break)
|
||||
use `args: [--markdown-linebreak-ext=md]` (or other extensions used
|
||||
by your markdownfiles). If for some reason you want to treat all files
|
||||
as markdown, use `--markdown-linebreak-ext=*`.
|
||||
|
||||
### As a standalone package
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue