From e91249a876bbb0573ba6ca2a044fdee3bd96fd05 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Mon, 23 Jan 2023 16:59:24 -0500 Subject: [PATCH] Detect Misskey links properly --- Tusker/TuskerNavigationDelegate.swift | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Tusker/TuskerNavigationDelegate.swift b/Tusker/TuskerNavigationDelegate.swift index acc5b4a3..61b93c3e 100644 --- a/Tusker/TuskerNavigationDelegate.swift +++ b/Tusker/TuskerNavigationDelegate.swift @@ -224,12 +224,13 @@ enum PopoverSource { private let statusPathRegex = try! NSRegularExpression( pattern: - "(^/@[a-z0-9_]+/\\d{18})" // mastodon - + "|(^/notice/[a-z0-9]{18})" // pleroma - + "|(^/p/[a-z0-9_]+/\\d{18})" // pixelfed - + "|(^/i/web/post/\\d{18})" // pixelfed web frontend - + "|(^/u/.+/h/[a-z0-9]{18})" // honk - + "|(^/@.+/statuses/[a-z0-9]{26})" // gotosocial + "(^/@[a-z0-9_]+/\\d{18})" // mastodon + + "|(^/notice/[a-z0-9]{18})" // pleroma + + "|(^/notes/[a-z0-9]{10})" // misskey + + "|(^/p/[a-z0-9_]+/\\d{18})" // pixelfed + + "|(^/i/web/post/\\d{18})" // pixelfed web frontend + + "|(^/u/.+/h/[a-z0-9]{18})" // honk + + "|(^/@.+/statuses/[a-z0-9]{26})" // gotosocial , options: .caseInsensitive )