Skip to content

Commit

Permalink
editorconfigGH-19 clarified laeding slash in the spec
Browse files Browse the repository at this point in the history
  • Loading branch information
mipo256 committed Mar 1, 2025
1 parent 85b2921 commit f6ecd4d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -417,3 +420,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
.. _gitignore format: https://git-scm.com/docs/gitignore#_pattern_format

0 comments on commit f6ecd4d

Please # to comment.