mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-03 21:08:25 +00:00 
			
		
		
		
	Clean cherry-pick of https://github.com/go-gitea/gitea/pull/32916. Update all go tool dependencies to latest version.
This commit is contained in:
		@@ -24,7 +24,7 @@ type GlobalVarsType struct {
 | 
			
		||||
	LinkRegex   *regexp.Regexp // fast matching a URL link, no any extra validation.
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var GlobalVars = sync.OnceValue[*GlobalVarsType](func() *GlobalVarsType {
 | 
			
		||||
var GlobalVars = sync.OnceValue(func() *GlobalVarsType {
 | 
			
		||||
	v := &GlobalVarsType{}
 | 
			
		||||
	v.wwwURLRegxp = regexp.MustCompile(`^www\.[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}((?:/|[#?])[-a-zA-Z0-9@:%_\+.~#!?&//=\(\);,'">\^{}\[\]` + "`" + `]*)?`)
 | 
			
		||||
	v.LinkRegex, _ = xurls.StrictMatchingScheme("https?://")
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user