mirror of https://github.com/tootsuite/mastodon
Add dat, dweb, ipfs, ipns, ssb, gopher protocols to URL extractor (#7810)
* Add dat:// and gopher:// to URL extractor Fix #6072 * Fix comment indent * Add dweb, ipfs, ipns, ssbpull/7814/head
parent
09147186b7
commit
0df91c7b1e
|
@ -30,7 +30,7 @@ module Twitter
|
||||||
( # $1 total match
|
( # $1 total match
|
||||||
(#{REGEXEN[:valid_url_preceding_chars]}) # $2 Preceeding chracter
|
(#{REGEXEN[:valid_url_preceding_chars]}) # $2 Preceeding chracter
|
||||||
( # $3 URL
|
( # $3 URL
|
||||||
(https?:\/\/)? # $4 Protocol (optional)
|
((https?|dat|dweb|ipfs|ipns|ssb|gopher):\/\/)? # $4 Protocol (optional)
|
||||||
(#{REGEXEN[:valid_domain]}) # $5 Domain(s)
|
(#{REGEXEN[:valid_domain]}) # $5 Domain(s)
|
||||||
(?::(#{REGEXEN[:valid_port_number]}))? # $6 Port number (optional)
|
(?::(#{REGEXEN[:valid_port_number]}))? # $6 Port number (optional)
|
||||||
(/#{REGEXEN[:valid_url_path]}*)? # $7 URL Path and anchor
|
(/#{REGEXEN[:valid_url_path]}*)? # $7 URL Path and anchor
|
||||||
|
|
Loading…
Reference in New Issue