From: David ‘Bombe’ Roden Date: Fri, 26 Aug 2022 09:57:16 +0000 (+0200) Subject: 🔀 Merge bugfix/too-long-urls X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=feb4aeda86e2c3d7deff163eda53191d6baa5650;hp=55b16eeec3c6ad9af4a77e1ee0efc4593f1875d3;p=Sone.git 🔀 Merge bugfix/too-long-urls --- diff --git a/build.gradle b/build.gradle index c7e550e..b23af3d 100644 --- a/build.gradle +++ b/build.gradle @@ -1,8 +1,8 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { - id 'org.jetbrains.kotlin.jvm' version '1.4.32' - id 'org.jetbrains.kotlin.plugin.noarg' version '1.4.32' + id 'org.jetbrains.kotlin.jvm' version '1.7.10' + id 'org.jetbrains.kotlin.plugin.noarg' version '1.7.10' id 'info.solidsoft.pitest' version '1.7.4' id 'jacoco' } diff --git a/src/main/kotlin/net/pterodactylus/sone/text/SoneTextParser.kt b/src/main/kotlin/net/pterodactylus/sone/text/SoneTextParser.kt index c97a1fc..6af0fde 100644 --- a/src/main/kotlin/net/pterodactylus/sone/text/SoneTextParser.kt +++ b/src/main/kotlin/net/pterodactylus/sone/text/SoneTextParser.kt @@ -32,7 +32,7 @@ class SoneTextParser @Inject constructor(private val soneProvider: SoneProvider? else LinkType.values() .mapNotNull { it.findNext(remainder.second) } - .minBy { it.position } + .minByOrNull { it.position } .let { when { it == null -> PlainTextPart(remainder.second) to ""