diff --git a/.editorconfig b/.editorconfig index f512c34..06f208f 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,30 +1,32 @@ -# EditorConfig is awesome: http://EditorConfig.org -# -# Use as master: https://github.com/TYPO3-Documentation/T3DocTeam/blob/main/.editorconfig +# EditorConfig is awesome: https://EditorConfig.org + +# Master copy, used unchanged by every TYPO3 documentation repository: +# https://github.com/TYPO3-Documentation/TYPO3CMS-Guide-HowToDocument -# top-most EditorConfig file root = true -[{*.rst,*.rst.txt}] +# Code examples indent two spaces, whatever the language, so that a nested +# example still fits the line length the prose around it is wrapped to +[*] charset = utf-8 end_of_line = lf +indent_style = space +indent_size = 2 insert_final_newline = true trim_trailing_whitespace = true -indent_style = space + +# reStructuredText is the exception: one indentation level is four spaces +[{*.rst,*.rst.txt}] indent_size = 4 max_line_length = 80 -# MD-Files [*.md] -charset = utf-8 -end_of_line = lf -insert_final_newline = true -trim_trailing_whitespace = true -indent_style = space -indent_size = 4 max_line_length = 80 -# Makefile -[{Makefile,**.mk}] -# Use tabs for indentation (Makefiles require tabs) +# Makefiles do not work without real tabs +[{Makefile,_Makefile,**.mk}] indent_style = tab + +# In a patch a leading or trailing space is content, not whitespace +[*.diff] +trim_trailing_whitespace = false