mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Revert "WIP: Title tags"
This commit is contained in:
@@ -52,8 +52,8 @@ struct ArticleStringFormatter {
|
||||
return s
|
||||
}
|
||||
|
||||
static func truncatedTitle(_ article: Article, forHTML: Bool = false) -> String {
|
||||
guard let title = article.sanitizedTitle(forHTML: forHTML) else {
|
||||
static func truncatedTitle(_ article: Article) -> String {
|
||||
guard let title = article.title else {
|
||||
return ""
|
||||
}
|
||||
|
||||
@@ -64,11 +64,7 @@ struct ArticleStringFormatter {
|
||||
var s = title.replacingOccurrences(of: "\n", with: "")
|
||||
s = s.replacingOccurrences(of: "\r", with: "")
|
||||
s = s.replacingOccurrences(of: "\t", with: "")
|
||||
|
||||
if !forHTML {
|
||||
s = s.rsparser_stringByDecodingHTMLEntities()
|
||||
}
|
||||
|
||||
s = s.rsparser_stringByDecodingHTMLEntities()
|
||||
s = s.trimmingWhitespace
|
||||
s = s.collapsingWhitespace
|
||||
|
||||
@@ -83,12 +79,6 @@ struct ArticleStringFormatter {
|
||||
return s
|
||||
}
|
||||
|
||||
static func attributedTruncatedTitle(_ article: Article) -> NSAttributedString {
|
||||
let title = truncatedTitle(article, forHTML: true)
|
||||
let attributed = NSAttributedString(html: title)
|
||||
return attributed
|
||||
}
|
||||
|
||||
static func truncatedSummary(_ article: Article) -> String {
|
||||
guard let body = article.body else {
|
||||
return ""
|
||||
|
||||
Reference in New Issue
Block a user