We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 15fc8b5 commit 1fb6b84Copy full SHA for 1fb6b84
1 file changed
toml/glob.go
@@ -28,11 +28,12 @@ func globToRegexp(pattern string) *regexp.Regexp {
28
switch {
29
case ch == '\\' && i+1 < len(pattern):
30
next := pattern[i+1]
31
- if next == '*' {
+ switch next {
32
+ case '*':
33
b.WriteString(regexp.QuoteMeta("*"))
- } else if next == '\\' {
34
+ case '\\':
35
b.WriteString(regexp.QuoteMeta("\\"))
- } else {
36
+ default:
37
b.WriteString(regexp.QuoteMeta(string(next)))
38
}
39
i += 2
0 commit comments