From c5efb4d1ddefbb91cc50bfaae4afc2a9ed8789d0 Mon Sep 17 00:00:00 2001 From: nea Date: Sat, 9 Sep 2023 15:43:15 +0200 Subject: Fix chat links sometimes retaining .s at the end Fuck patcher, istg [no changelog] --- src/main/kotlin/moe/nea/firmament/features/chat/ChatLinks.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/kotlin/moe/nea/firmament') diff --git a/src/main/kotlin/moe/nea/firmament/features/chat/ChatLinks.kt b/src/main/kotlin/moe/nea/firmament/features/chat/ChatLinks.kt index fb3c0c2..6bb6f6e 100644 --- a/src/main/kotlin/moe/nea/firmament/features/chat/ChatLinks.kt +++ b/src/main/kotlin/moe/nea/firmament/features/chat/ChatLinks.kt @@ -53,7 +53,7 @@ object ChatLinks : FirmamentFeature { private fun isUrlAllowed(url: String) = isHostAllowed(url.removePrefix("https://").substringBefore("/")) override val config get() = TConfig - val urlRegex = "https://[^. ]+\\.[^ ]+(\\.? |$)".toRegex() + val urlRegex = "https://[^. ]+\\.[^ ]+(\\.?( |$))".toRegex() data class Image( val texture: Identifier, -- cgit