We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d7f8307 + 6d08570 commit 6402da1Copy full SHA for 6402da1
V2exOS/Views/TopicDetail/CommentListView.swift
@@ -57,6 +57,12 @@ struct CommentListView: View {
57
58
Markdown(
59
comment.content
60
+ .replacingOccurrences(
61
+ of: #"https?.*"#,
62
+ with: "[$0]($0)",
63
+ options: .regularExpression,
64
+ range: nil
65
+ )
66
.replacingOccurrences(
67
of: #"@(\w+)"#,
68
with: "[$0](https://www.v2ex.com/member/$1)",
V2exOS/Views/TopicDetail/TopicDetailView.swift
@@ -46,6 +46,10 @@ struct TopicDetailView: View {
46
Text(Date(timeIntervalSince1970: TimeInterval(created)).fromNow())
47
}
48
49
+ Link(destination: URL(string: "https://www.v2ex.com/t/\(topic.id)")!) {
50
+ Image(systemName: "safari")
51
+ Text("在网页中打开")
52
+ }
53
54
}.foregroundColor(Color(NSColor.secondaryLabelColor))
55
0 commit comments