Skip to content

Commit 5ba88e0

Browse files
committed
fix regexp (and tests)
1 parent a4ef685 commit 5ba88e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

proxy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ go get gopkg.in/yaml.v3
5050

5151
// gopkg.in/yaml.v3 _ https://github.com/go-yaml/yaml/tree/v3.0.1{/dir} https://github.com/go-yaml/yaml/blob/v3.0.1{/dir}/{file}#L{line} -> https://github.com/go-yaml/yaml
5252
// golang.org/x/term -> go.googlesource.com/term -> https://github.com/golang/go
53-
var ghRE = regexp.MustCompile(`https://(github\.com/[^/]+/[^/{}]+)`) // Use github\.com to match literal dot, [^/{}]+ to stop at /, {, or }
53+
var ghRE = regexp.MustCompile(`https://(github\.com/[^\s/{}]+/[^\s/{}]+)`) // Use github\.com to match literal dot, [^\s/{}]+ to stop at whitespace, /, {, or }
5454
var goGooglesourceRE = regexp.MustCompile(`https://go\.googlesource\.com/(\w+)`)
5555

5656
// parseProxyHTML finds github repo in proxy HTML.

0 commit comments

Comments
 (0)