aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornea <nea@nea.moe>2023-09-09 15:43:15 +0200
committernea <nea@nea.moe>2023-09-09 15:43:15 +0200
commitc5efb4d1ddefbb91cc50bfaae4afc2a9ed8789d0 (patch)
tree01ed1eed14accb7cc765ebbee8a0e366ac325dbf
parente1eac7232420d34bf7c347a9e3d49e75a7399cae (diff)
downloadFirmament-c5efb4d1ddefbb91cc50bfaae4afc2a9ed8789d0.tar.gz
Firmament-c5efb4d1ddefbb91cc50bfaae4afc2a9ed8789d0.tar.bz2
Firmament-c5efb4d1ddefbb91cc50bfaae4afc2a9ed8789d0.zip
Fix chat links sometimes retaining .s at the end
Fuck patcher, istg [no changelog]
-rw-r--r--src/main/kotlin/moe/nea/firmament/features/chat/ChatLinks.kt2
1 files changed, 1 insertions, 1 deletions
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,