From dcd002d95d9872be7d6a4557f2bef4edfe5e72a4 Mon Sep 17 00:00:00 2001 From: mipo256 Date: Sat, 1 Mar 2025 12:49:33 +0300 Subject: [PATCH] Clarified conflicting rules in multiple sections defined in the same .editorconfig file --- index.rst | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/index.rst b/index.rst index 03d8c22..a33db75 100644 --- a/index.rst +++ b/index.rst @@ -209,8 +209,12 @@ given filename. The search shall stop if an EditorConfig file is found with the ``root`` key set to ``true`` in the preamble or when reaching the root filesystem directory. -Files are read top to bottom and the most recent rules found take -precedence. If multiple EditorConfig files have matching sections, the rules +Files are read top to bottom and the most recent pairs found take +precedence. Thus, in case a given file matches multiple sections +within a single ``.editorconfig`` file, the pairs defined in the section that +comes later in the ``.editorconfig`` file take precedence over pairs defined +in the section that comes earlier in the same ``.editorconfig`` file. +If multiple EditorConfig files have matching sections, the pairs from the closer EditorConfig file are read last, so pairs in closer files take precedence.