mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-01-10 16:25:26 +00:00
Embed Threads quote
This commit is contained in:
parent
4dd4968bb2
commit
23960d6d0f
1 changed files with 8 additions and 4 deletions
|
@ -139,10 +139,14 @@ public struct HTMLString: Codable, Equatable, Hashable, @unchecked Sendable {
|
|||
} else if node.nodeName() == "a" {
|
||||
let href = try node.attr("href")
|
||||
if href != "" {
|
||||
if let url = URL(string: href),
|
||||
let _ = Int(url.lastPathComponent)
|
||||
{
|
||||
if let url = URL(string: href) {
|
||||
if Int(url.lastPathComponent) != nil {
|
||||
statusesURLs.append(url)
|
||||
} else if url.host() == "www.threads.net" || url.host() == "threads.net",
|
||||
url.pathComponents.count == 4,
|
||||
url.pathComponents[2] == "post" {
|
||||
statusesURLs.append(url)
|
||||
}
|
||||
}
|
||||
}
|
||||
asMarkdown += "["
|
||||
|
|
Loading…
Reference in a new issue