From: Eric Wong Date: Fri, 11 Apr 2025 18:35:51 +0000 (+0000) Subject: linkify: give tags to gemini:// URLs X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ca72b7ec7c38f5c00dbc28aa31ed933ad46b83d;p=thirdparty%2Fpublic-inbox.git linkify: give tags to gemini:// URLs While I still think serving the Gemini text and protocol is unnecessary bloat on our part, there are web browsers with gemini:// support, so we might as well support it. --- diff --git a/lib/PublicInbox/Linkify.pm b/lib/PublicInbox/Linkify.pm index 306a57e77..02df9588e 100644 --- a/lib/PublicInbox/Linkify.pm +++ b/lib/PublicInbox/Linkify.pm @@ -17,7 +17,8 @@ use PublicInbox::Hval qw(ascii_html mid_href); use PublicInbox::MID qw($MID_EXTRACT); my $SALT = rand; -my $LINK_RE = qr{([\('!])?\b((?:ftps?|https?|nntps?|imaps?|s?news|gopher):// +my $LINK_RE = qr{([\('!])?\b( + (?:ftps?|https?|nntps?|imaps?|s?news|gopher|gemini):// [\@:\w\.-]+(?:/ (?:[a-z0-9\-\._~!\$\&\';\(\)\*\+,;=:@/%]*) (?:\?[a-z0-9\-\._~!\$\&\';\(\)\*\+,;=:@/%]+)?