removed superfluous braces

This commit is contained in:
Toni Förster 2023-11-21 01:13:01 +01:00
parent 691a3305e7
commit ed69780d52
No known key found for this signature in database
GPG Key ID: 292F3E5086C83FC7

View File

@ -91,7 +91,7 @@ struct VideoDescription: View {
var attrString = AttributedString(description)
let words = description.unicodeScalars.split(whereSeparator: separators.contains).map(String.init)
words.forEach { word in
if (word.hasPrefix("https://") || word.hasPrefix("http://")), let url = URL(string: String(word)) {
if word.hasPrefix("https://") || word.hasPrefix("http://"), let url = URL(string: String(word)) {
if let range = attrString.range(of: word) {
attrString[range].link = url
}