Shorten the max external URL length so that it is less likely to wrap on the iPhone at the default size
This commit is contained in:
parent
1c23f02803
commit
90c5ad8351
|
@ -155,8 +155,8 @@ private extension ArticleRenderer {
|
|||
|
||||
if let externalLink = article.externalURL, externalLink != article.preferredLink {
|
||||
var displayLink = externalLink.strippingHTTPOrHTTPSScheme
|
||||
if displayLink.count > 40 {
|
||||
displayLink = displayLink.prefix(40).appending("...")
|
||||
if displayLink.count > 27 {
|
||||
displayLink = displayLink.prefix(27).appending("...")
|
||||
}
|
||||
let regarding = NSLocalizedString("Link", comment: "Link")
|
||||
let externalLinkString = "\(regarding): <a href=\"\(externalLink)\">\(displayLink)</a>"
|
||||
|
|
Loading…
Reference in New Issue