Skip to content

Commit 859038e

Browse files
author
Noah Gorny
committed
Allow trailing spaces in md/rst files
1 parent 501b1ab commit 859038e

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

.editorconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ charset = utf-8
99
trim_trailing_whitespace = true
1010
insert_final_newline = true
1111

12-
[*.md]
12+
[*.{md,rst}]
1313
trim_trailing_whitespace = false
1414

1515
[.git*]

.gitattributes

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
*.sh text eol=lf
22
*.bash text eol=lf
33

4+
# Docs allow trailing whitespaces
5+
*.md whitespace=-blank-at-eol
6+
*.rst whitespace=-blank-at-eol
7+
48
# Windows files
59
*.bat text eol=crlf

.pre-commit-config.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ repos:
99
rev: v2.3.0
1010
hooks:
1111
- id: trailing-whitespace
12+
exclude: ".(md|rst)$"
1213
- id: end-of-file-fixer
1314
- id: check-merge-conflict
1415
- id: mixed-line-ending

0 commit comments

Comments
 (0)