From d776ee2ca6d2c95f8d9b741614f4f2ab0419cd97 Mon Sep 17 00:00:00 2001 From: mipo256 Date: Tue, 14 Jan 2025 21:46:38 +0300 Subject: [PATCH] GH-19 clarified laeding slash in the spec --- index.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/index.rst b/index.rst index 9cb3fd3..8b52e52 100644 --- a/index.rst +++ b/index.rst @@ -1,4 +1,4 @@ -.. Copyright (c) 2019--2024 EditorConfig Team +.. Copyright (c) 2019--2025 EditorConfig Team All rights reserved. Redistribution and use in source and binary forms, with or without @@ -189,6 +189,9 @@ directory of ``.editorconfig`` or any other directory below one that stores this However, the glob ``subdir/*.c`` only matches files that end with ``.c`` in the ``subdir`` directory in the directory of ``.editorconfig``. +Therefore, a leading slash is not relevant if there is already a slash in the middle of the pattern. +Thus, the globs `/subdir/*.c` and `subdir/*.c` must yield the same result. + As a corollary, a section name ending with ``/`` does not match any file. The backslash character (``\\``) can be used to escape a character so it is @@ -424,3 +427,4 @@ this specification. .. _plugin-tests repository: https://github.com/editorconfig/editorconfig-plugin-tests .. _Semantic Versioning 2.0.0: https://semver.org/spec/v2.0.0.html .. _specification repository: https://github.com/editorconfig/specification +