From c912ee90d391c3a7c7f3535e7f3fd4a57caa2075 Mon Sep 17 00:00:00 2001 From: nea Date: Fri, 1 Sep 2023 00:50:12 +0200 Subject: Remove dot from end of links in chat --- src/main/kotlin/moe/nea/firmament/features/chat/ChatLinks.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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 7d563fa..1ce5a1b 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