mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-12-01 09:50:16 +00:00
Suppress any URL links that are just pointing to the quoted status.
This commit is contained in:
1 parent
a54af07ec7
commit
8fcc46191a
1 file changed
+10
-2
@@ -86,9 +86,17 @@ private extension TwitterStatus {
|
||||
if prevIndex < entityStartIndex {
|
||||
html += String(text[prevIndex..<entityStartIndex])
|
||||
}
|
||||
html += entity.renderAsHTML()
|
||||
prevIndex = entityEndIndex
|
||||
|
||||
// We drop off any URL which is just pointing to the quoted status. It is redundant.
|
||||
if let twitterURL = entity as? TwitterURL, let expandedURL = twitterURL.expandedURL, let quotedURL = quotedStatus?.url {
|
||||
if expandedURL.caseInsensitiveCompare(quotedURL) != .orderedSame {
|
||||
html += entity.renderAsHTML()
|
||||
}
|
||||
} else {
|
||||
html += entity.renderAsHTML()
|
||||
}
|
||||
|
||||
prevIndex = entityEndIndex
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user