Extend autolink parsing to handle non-HTTP links, add fallback for invalid autolinks, and update ParseTest coverage.

This commit is contained in:
2026-02-27 15:18:10 +01:00
parent bda99a5d56
commit f93a06451d
2 changed files with 6 additions and 2 deletions

View File

@@ -133,8 +133,12 @@ private val states = listOf(
if (content.contains("@") and content.contains(".")) {
Link("mailto:$content", content)
} else {
} else if (content.startsWith("http://") ||
content.startsWith("https://")
) {
Link(content, content)
} else {
Text("<$content>")
}
},