Fix gitignore highlighter glob handling
Fixes the handling of multiple backslashes before gitignore * and ? glob patterns. Adds character classes to gitignore highlighting. Co-authored-by: Johannes Altmanninger <aclopte@gmail.com>
This commit is contained in:
parent
ed99e056b6
commit
70013f5174
|
@ -53,7 +53,7 @@ add-highlighter shared/git-commit/comments/ regex "\b(?:(modified)|(deleted)|(ne
|
|||
|
||||
provide-module git-ignore %{
|
||||
add-highlighter shared/git-ignore group
|
||||
add-highlighter shared/git-ignore/glob regex '(?<!\\)\*((?<!\\)\*)?|(?<!\\)\?' 0:operator
|
||||
+add-highlighter shared/git-ignore/glob regex '(?<!\\)(?:\\\\)*\K(\*\*?|\?|\[.*?(?<!\\)(?:\\\\)*\])' 0:operator
|
||||
add-highlighter shared/git-ignore/negate regex '^!' 0:operator
|
||||
add-highlighter shared/git-ignore/comments regex '^#.*?$' 0:comment
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user