mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 21:43:41 +00:00
removed superfluous braces
This commit is contained in:
parent
691a3305e7
commit
ed69780d52
@ -91,7 +91,7 @@ struct VideoDescription: View {
|
|||||||
var attrString = AttributedString(description)
|
var attrString = AttributedString(description)
|
||||||
let words = description.unicodeScalars.split(whereSeparator: separators.contains).map(String.init)
|
let words = description.unicodeScalars.split(whereSeparator: separators.contains).map(String.init)
|
||||||
words.forEach { word in
|
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) {
|
if let range = attrString.range(of: word) {
|
||||||
attrString[range].link = url
|
attrString[range].link = url
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user