Make links clickable in follow user view
This commit is contained in:
@@ -15,7 +15,7 @@ public struct Markdown {
|
||||
return url.contains("://") ? url : "https://" + url
|
||||
}
|
||||
|
||||
static func parseMarkdown(content: String) -> AttributedString {
|
||||
public static func parse(content: String) -> AttributedString {
|
||||
// Similar to the parsing in NoteContentView
|
||||
let md_opts: AttributedString.MarkdownParsingOptions =
|
||||
.init(interpretedSyntax: .inlineOnlyPreservingWhitespace)
|
||||
@@ -38,6 +38,6 @@ public struct Markdown {
|
||||
output.replaceSubrange(range, with: "[\(url)](\(Markdown.withScheme(url)))")
|
||||
}
|
||||
// TODO: escape unintentional markdown
|
||||
return Markdown.parseMarkdown(content: output)
|
||||
return Markdown.parse(content: output)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user