From 8ca72b7ec7c38f5c00dbc28aa31ed933ad46b83d Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 11 Apr 2025 18:35:51 +0000 Subject: [PATCH] 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. --- lib/PublicInbox/Linkify.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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\-\._~!\$\&\';\(\)\*\+,;=:@/%]+)? -- 2.39.5