From: Edgar HIPP Date: Sun, 30 Aug 2015 15:06:57 +0000 (+0200) Subject: Path-extractor doesn't match this X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=1c202de885adce41536f6326ee253455a4670766;p=path-extractor.git Path-extractor doesn't match this --- diff --git a/pe_test.go b/pe_test.go index 2099927..58c138f 100644 --- a/pe_test.go +++ b/pe_test.go @@ -18,6 +18,11 @@ func TestGitIgnore(t *testing.T) { t.Errorf("Doesnt match hidden files", output) } + output = GetAllMatches(" this.user ") + if len(output) != 0 { + t.Errorf("Matches this.user", output) + } + output = GetAllMatches(" mail@mail.com ") if len(output) != 0 { t.Errorf("Matches email adresses", output) diff --git a/validators.go b/validators.go index 2ed2a88..b0501d6 100644 --- a/validators.go +++ b/validators.go @@ -67,7 +67,7 @@ func endsWithInvalidString(input string) bool { } func containsInvalidString(input string) bool { - invalidStrings := []string{"(", ")", "and/or", "origin/", "{", "}", "<", ">", "$", "*"} + invalidStrings := []string{"(", ")", "and/or", "origin/", "{", "}", "<", ">", "$", "*", "this."} for _, s := range invalidStrings { if strings.Contains(input, s) { return true