Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix pattern with slash in range (#55)
When a slash appears in a range, it should NOT match a directory separator. Quoting https://git-scm.com/docs/gitignore#_pattern_format: The range notation, e.g. [a-zA-Z], can be used to match one of the characters in a range. See fnmatch(3) and the FNM_PATHNAME flag for a more detailed description. And quoting what fnmatch(3) has to say about FNM_PATHNAME: match a slash in string only with a slash in pattern and not by an asterisk (*) or a question mark (?) metacharacter, nor by a bracket expression ([]) containing a slash. Hence, it seems to me that a slash inside a range should be disregarded.
- Loading branch information