spotless apply.
This commit is contained in:
@@ -23,13 +23,12 @@ package com.vitorpamplona.quartz.utils
|
|||||||
import io.kotlingeekdev.urireference.URIReference
|
import io.kotlingeekdev.urireference.URIReference
|
||||||
|
|
||||||
actual object Rfc3986 {
|
actual object Rfc3986 {
|
||||||
|
actual fun normalize(uri: String): String = URIReference.parse(uri).normalize().toString()
|
||||||
|
|
||||||
actual fun normalize(uri: String): String =
|
actual fun isValidUrl(url: String): Boolean =
|
||||||
URIReference.parse(uri).normalize().toString()
|
runCatching {
|
||||||
|
URIReference.parse(url)
|
||||||
actual fun isValidUrl(url: String): Boolean = runCatching {
|
}.isSuccess
|
||||||
URIReference.parse(url)
|
|
||||||
}.isSuccess
|
|
||||||
|
|
||||||
actual fun normalizeAndRemoveFragment(url: String): String =
|
actual fun normalizeAndRemoveFragment(url: String): String =
|
||||||
URIReference
|
URIReference
|
||||||
@@ -38,7 +37,12 @@ actual object Rfc3986 {
|
|||||||
.toStringNoFragment()
|
.toStringNoFragment()
|
||||||
.internIfPossible()
|
.internIfPossible()
|
||||||
|
|
||||||
actual fun host(url: String): String = URIReference.parse(url).host?.value.toString()
|
actual fun host(url: String): String =
|
||||||
|
URIReference
|
||||||
|
.parse(url)
|
||||||
|
.host
|
||||||
|
?.value
|
||||||
|
.toString()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun URIReference.toStringNoFragment(): String {
|
fun URIReference.toStringNoFragment(): String {
|
||||||
|
|||||||
@@ -22,5 +22,4 @@ package com.vitorpamplona.quartz.utils
|
|||||||
|
|
||||||
import com.vitorpamplona.quartz.utils.urldetector.detection.UrlDetector
|
import com.vitorpamplona.quartz.utils.urldetector.detection.UrlDetector
|
||||||
|
|
||||||
|
|
||||||
actual fun fastFindURLs(text: String): List<String> = UrlDetector(text).detect().map { it.originalUrl }
|
actual fun fastFindURLs(text: String): List<String> = UrlDetector(text).detect().map { it.originalUrl }
|
||||||
|
|||||||
Reference in New Issue
Block a user