Skip to content

Commit

Permalink
insert_final_newline: don't do so on an empty file
Browse files Browse the repository at this point in the history
Fixes #15.
  • Loading branch information
cxw42 committed Sep 23, 2024
1 parent 3eee14a commit 2b2ad2a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ files take precedence.
Supported Pairs
===============

.. versionchanged:: 0.16
.. versionchanged:: 0.17.1

EditorConfig file sections contain key-value pairs separated by an
equal sign (``=``). With the exception of the ``root`` key, all pairs MUST be
Expand Down Expand Up @@ -252,6 +252,10 @@ and the supported values associated with them:
* - ``insert_final_newline``
- Set to ``true`` ensure file ends with a newline when saving and ``false``
to ensure it doesn't.

**Note:** Editors must not insert newlines in empty files when
saving those files, even if ``insert_final_newline = true``.

* - ``root``
- Must be specified in the preamble. Set to ``true`` to stop the
``.editorconfig`` file search on the current file. The value is case
Expand Down

0 comments on commit 2b2ad2a

Please sign in to comment.