mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-01-11 00:25:35 +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" {
|
} else if node.nodeName() == "a" {
|
||||||
let href = try node.attr("href")
|
let href = try node.attr("href")
|
||||||
if href != "" {
|
if href != "" {
|
||||||
if let url = URL(string: href),
|
if let url = URL(string: href) {
|
||||||
let _ = Int(url.lastPathComponent)
|
if Int(url.lastPathComponent) != nil {
|
||||||
{
|
|
||||||
statusesURLs.append(url)
|
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 += "["
|
asMarkdown += "["
|
||||||
|
|
Loading…
Reference in a new issue