mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Fix lint issues.
This commit is contained in:
@@ -117,11 +117,10 @@ private extension RSSInJSONParser {
|
||||
}
|
||||
if s.isEmpty {
|
||||
// Sheesh. Tough case.
|
||||
if let _ = contentHTML {
|
||||
s = contentHTML!
|
||||
}
|
||||
if let _ = contentText {
|
||||
s = contentText!
|
||||
if let contentHTML {
|
||||
s = contentHTML
|
||||
} else if let contentText {
|
||||
s = contentText
|
||||
}
|
||||
}
|
||||
uniqueID = s.md5String
|
||||
|
||||
@@ -28,10 +28,7 @@ public final class ParsedItem: Hashable, Sendable {
|
||||
public let tags: Set<String>?
|
||||
public let attachments: Set<ParsedAttachment>?
|
||||
|
||||
public init(syncServiceID: String?, uniqueID: String, feedURL: String, url: String?, externalURL: String?, title: String?,
|
||||
language: String?, contentHTML: String?, contentText: String?, summary: String?, imageURL: String?,
|
||||
bannerImageURL: String?, datePublished: Date?, dateModified: Date?, authors: Set<ParsedAuthor>?,
|
||||
tags: Set<String>?, attachments: Set<ParsedAttachment>?) {
|
||||
public init(syncServiceID: String?, uniqueID: String, feedURL: String, url: String?, externalURL: String?, title: String?, language: String?, contentHTML: String?, contentText: String?, summary: String?, imageURL: String?, bannerImageURL: String?, datePublished: Date?, dateModified: Date?, authors: Set<ParsedAuthor>?, tags: Set<String>?, attachments: Set<ParsedAttachment>?) {
|
||||
|
||||
self.syncServiceID = syncServiceID
|
||||
self.uniqueID = uniqueID
|
||||
|
||||
@@ -131,9 +131,10 @@ private func decodedRawEntityValue(_ rawEntity: ContiguousArray<UInt8>) -> Strin
|
||||
entityCharacters.append(character)
|
||||
}
|
||||
|
||||
let key = String(decoding: entityCharacters, as: UTF8.self)
|
||||
if let entityString = entitiesDictionary[key] {
|
||||
return entityString
|
||||
if let key = String(bytes: entityCharacters, encoding: .utf8) {
|
||||
if let entityString = entitiesDictionary[key] {
|
||||
return entityString
|
||||
}
|
||||
}
|
||||
|
||||
if rawEntity[0] == numberSignCharacter {
|
||||
|
||||
Reference in New Issue
Block a user