mirror of
https://github.com/go-gitea/gitea
synced 2025-07-23 18:58:38 +00:00
vendor: update mvdan.cc/xurls/v2 to v2.1.0 (#8495)
This commit is contained in:
committed by
Lunny Xiao
parent
15809d81f7
commit
ba201aaa44
10
vendor/mvdan.cc/xurls/v2/xurls.go
vendored
10
vendor/mvdan.cc/xurls/v2/xurls.go
vendored
@@ -19,9 +19,9 @@ const (
|
||||
iriChar = letter + mark + number
|
||||
currency = `\p{Sc}`
|
||||
otherSymb = `\p{So}`
|
||||
endChar = iriChar + `/\-+_&~*%=#` + currency + otherSymb
|
||||
endChar = iriChar + `/\-+&~%=#` + currency + otherSymb
|
||||
otherPunc = `\p{Po}`
|
||||
midChar = endChar + `|` + otherPunc
|
||||
midChar = endChar + "_*" + otherPunc
|
||||
wellParen = `\([` + midChar + `]*(\([` + midChar + `]*\)[` + midChar + `]*)*\)`
|
||||
wellBrack = `\[[` + midChar + `]*(\[[` + midChar + `]*\][` + midChar + `]*)*\]`
|
||||
wellBrace = `\{[` + midChar + `]*(\{[` + midChar + `]*\}[` + midChar + `]*)*\}`
|
||||
@@ -72,9 +72,11 @@ func strictExp() string {
|
||||
}
|
||||
|
||||
func relaxedExp() string {
|
||||
site := domain + `(?i)` + anyOf(append(TLDs, PseudoTLDs...)...) + `(?-i)`
|
||||
punycode := `xn--[a-z0-9-]+`
|
||||
knownTLDs := anyOf(append(TLDs, PseudoTLDs...)...)
|
||||
site := domain + `(?i)(` + punycode + `|` + knownTLDs + `)(?-i)`
|
||||
hostName := `(` + site + `|` + ipAddr + `)`
|
||||
webURL := hostName + port + `(/|/` + pathCont + `?|\b|$)`
|
||||
webURL := hostName + port + `(/|/` + pathCont + `?|\b|(?m)$)`
|
||||
return strictExp() + `|` + webURL
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user