From 859038e58f3b9d9a41c3cd45906bec56aedf65b0 Mon Sep 17 00:00:00 2001 From: Noah Gorny Date: Thu, 17 Dec 2020 01:42:16 +0200 Subject: [PATCH] Allow trailing spaces in md/rst files --- .editorconfig | 2 +- .gitattributes | 4 ++++ .pre-commit-config.yaml | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.editorconfig b/.editorconfig index 3997f583..e1baa432 100755 --- a/.editorconfig +++ b/.editorconfig @@ -9,7 +9,7 @@ charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true -[*.md] +[*.{md,rst}] trim_trailing_whitespace = false [.git*] diff --git a/.gitattributes b/.gitattributes index bb7d1461..de622e06 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,5 +1,9 @@ *.sh text eol=lf *.bash text eol=lf +# Docs allow trailing whitespaces +*.md whitespace=-blank-at-eol +*.rst whitespace=-blank-at-eol + # Windows files *.bat text eol=crlf diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 84ed6ee7..caed0df9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,6 +9,7 @@ repos: rev: v2.3.0 hooks: - id: trailing-whitespace + exclude: ".(md|rst)$" - id: end-of-file-fixer - id: check-merge-conflict - id: mixed-line-ending