mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-23 10:02:58 -06:00
[chore]: Bump mvdan.cc/xurls/v2 from 2.5.0 to 2.6.0 (#3643)
Bumps [mvdan.cc/xurls/v2](https://github.com/mvdan/xurls) from 2.5.0 to 2.6.0. - [Release notes](https://github.com/mvdan/xurls/releases) - [Commits](https://github.com/mvdan/xurls/compare/v2.5.0...v2.6.0) --- updated-dependencies: - dependency-name: mvdan.cc/xurls/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
parent
4d423102c1
commit
b95498b8c2
86 changed files with 5284 additions and 1449 deletions
11
vendor/mvdan.cc/xurls/v2/xurls.go
vendored
11
vendor/mvdan.cc/xurls/v2/xurls.go
vendored
|
|
@ -75,7 +75,7 @@ const (
|
|||
`)`
|
||||
ipv6Addr = `(?:` + ipv6AddrMinusEmpty + `|::)`
|
||||
ipAddrMinusEmpty = `(?:` + ipv6AddrMinusEmpty + `|\b` + ipv4Addr + `\b)`
|
||||
port = `(?::[0-9]*)?`
|
||||
port = `(?::[0-9]+)?`
|
||||
)
|
||||
|
||||
// AnyScheme can be passed to StrictMatchingScheme to match any possibly valid
|
||||
|
|
@ -89,8 +89,10 @@ var SchemesNoAuthority = []string{
|
|||
`bitcoin`, // Bitcoin
|
||||
`cid`, // Content-ID
|
||||
`file`, // Files
|
||||
`geo`, // Geographic location
|
||||
`magnet`, // Torrent magnets
|
||||
`mailto`, // Mail
|
||||
`matrix`, // Matrix
|
||||
`mid`, // Message-ID
|
||||
`sms`, // SMS
|
||||
`tel`, // Telephone
|
||||
|
|
@ -163,7 +165,7 @@ func relaxedExp() string {
|
|||
|
||||
hostName := `(?:` + domain + `|\[` + ipv6Addr + `\]|\b` + ipv4Addr + `\b)`
|
||||
webURL := hostName + port + `(?:/` + pathCont + `|/)?`
|
||||
email := `[a-zA-Z0-9._%\-+]+@` + domain
|
||||
email := `(?P<relaxedEmail>[a-zA-Z0-9._%\-+]+@` + domain + `)`
|
||||
return strictExp() + `|` + webURL + `|` + email + `|` + ipv6AddrMinusEmpty
|
||||
}
|
||||
|
||||
|
|
@ -178,7 +180,10 @@ func Strict() *regexp.Regexp {
|
|||
}
|
||||
|
||||
// Relaxed produces a regexp that matches any URL matched by Strict, plus any
|
||||
// URL with no scheme or email address.
|
||||
// URL or email address with no scheme.
|
||||
//
|
||||
// Email addresses without a scheme match the `relaxedEmail` subexpression,
|
||||
// which can be used to filter them as needed.
|
||||
func Relaxed() *regexp.Regexp {
|
||||
relaxedInit.Do(func() {
|
||||
relaxedRe = regexp.MustCompile(relaxedExp())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue