Removal of references to APIs using the Swift bridge.
This commit is contained in:
@@ -21,9 +21,7 @@
|
||||
package com.vitorpamplona.quartz.utils
|
||||
|
||||
import io.kotlingeekdev.urireference.URIReference
|
||||
import kotlinx.cinterop.ExperimentalForeignApi
|
||||
|
||||
@OptIn(ExperimentalForeignApi::class)
|
||||
actual object Rfc3986 {
|
||||
|
||||
actual fun normalize(uri: String): String =
|
||||
|
||||
@@ -20,12 +20,7 @@
|
||||
*/
|
||||
package com.vitorpamplona.quartz.utils
|
||||
|
||||
import kotlinx.cinterop.ExperimentalForeignApi
|
||||
import swiftbridge.UrlDetector
|
||||
import com.vitorpamplona.quartz.utils.urldetector.detection.UrlDetector
|
||||
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
@OptIn(ExperimentalForeignApi::class)
|
||||
actual fun fastFindURLs(text: String): List<String> {
|
||||
val detectorInstance = UrlDetector()
|
||||
return detectorInstance.findURLsWithText(text) as List<String>
|
||||
}
|
||||
|
||||
actual fun fastFindURLs(text: String): List<String> = UrlDetector(text).detect().map { it.originalUrl }
|
||||
|
||||
Reference in New Issue
Block a user