Skip to content

Commit 9f105e5

Browse files
feat: 评论内容 https? 可跳转对应网址
1 parent 1fb4a75 commit 9f105e5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

V2exOS/Views/TopicDetail/CommentListView.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ struct CommentListView: View {
5757

5858
Markdown(
5959
comment.content
60+
.replacingOccurrences(
61+
of: #"https?.*"#,
62+
with: "[$0]($0)",
63+
options: .regularExpression,
64+
range: nil
65+
)
6066
.replacingOccurrences(
6167
of: #"@(\w+)"#,
6268
with: "[$0](https://www.v2ex.com/member/$1)",

0 commit comments

Comments
 (0)