Package-level declarations
Types
Link copied to clipboard
Computes ranges to exclude from link preview detection (mentions and markdown links).
Link copied to clipboard
Link copied to clipboard
Fetches preview content, interprets OpenGraph metadata, and prepares image assets.
Link copied to clipboard
internal class LinkPreviewRepositoryImpl(kaliumFileSystem: KaliumFileSystem, fetchHtmlHead: suspend (String) -> String? = ::fetchLinkPreviewHtmlHead, fetchImageData: suspend (String) -> FetchedPreviewImage? = ::fetchLinkPreviewImage) : LinkPreviewRepository
Link copied to clipboard
internal data class OpenGraphData(val title: String?, val type: String = "website", val url: String?, val description: String?, val imageUrls: List<String> = emptyList(), val siteName: String?)
Internal parsed Open Graph data structure.
Link copied to clipboard
Scans HTML head for Open Graph metadata using DOM-based parsing (Ksoup).
Link copied to clipboard
Blocks link previews for URLs from certain hosts (e.g., video/music streaming services). Uses substring matching for simplicity and to catch variations (e.g., youtu.be, youtube.com).
Link copied to clipboard
Extracts complete URL candidates with original UTF-16 spans. Fetching enforces network policy separately.
Properties
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
internal fun sanitizePreviewText(input: String?, maxLength: Int, collapseWhitespace: Boolean = true): String?