From 1c202de885adce41536f6326ee253455a4670766 Mon Sep 17 00:00:00 2001 From: Edgar HIPP Date: Sun, 30 Aug 2015 17:06:57 +0200 Subject: [PATCH] Path-extractor doesn't match this --- pe_test.go | 5 +++++ validators.go | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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 -- 2.44.0