Fix CRAN package version validation to allow more than 4 version components (#36813) (#36821)

Backport #36813

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: wxiaoguang <2114189+wxiaoguang@users.noreply.github.com>
This commit is contained in:
Giteabot
2026-03-04 09:29:22 +08:00
committed by GitHub
co-authored by Copilot wxiaoguang
parent b3bc79262d
commit 0f55eff0e7
2 changed files with 11 additions and 2 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ var (
var (
fieldPattern = regexp.MustCompile(`\A\S+:`)
namePattern = regexp.MustCompile(`\A[a-zA-Z][a-zA-Z0-9\.]*[a-zA-Z0-9]\z`)
versionPattern = regexp.MustCompile(`\A[0-9]+(?:[.\-][0-9]+){1,3}\z`)
versionPattern = regexp.MustCompile(`\A[0-9]+(?:[.\-][0-9]+)+\z`)
authorReplacePattern = regexp.MustCompile(`[\[\(].+?[\]\)]`)
)