Skip to content

Commit 1d81b76

Browse files
authored
improve regex for go version update (#176)
1 parent b40c6fe commit 1d81b76

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/updaters/go/github-imports-go.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export class GithubImportsGo extends DefaultUpdater {
77
}
88

99
return content.replace(
10-
/"(https:\/\/pkg.go.dev\/)?github\.com\/([^/]+)\/([^/]+)(\/v([1-9]\d*))?(\/[^"]+)?"/g,
10+
/"(https:\/\/pkg.go.dev\/)?github\.com\/([^/"\n]+)\/([^/"\n]+)(\/v([1-9]\d*))?(\/[^"\n]+)?"/g,
1111
(_, prefix, user, repo, ___, ____, path) =>
1212
`"${prefix ?? ''}github.com/${user}/${repo}${
1313
this.version.major < 2 ? '' : '/v' + this.version.major.toString()

0 commit comments

Comments
 (0)