Fix typo.
This commit is contained in:
parent
1368f3dace
commit
df6c4bedb3
|
@ -48,15 +48,15 @@ extension Article {
|
|||
}
|
||||
|
||||
var url: URL? {
|
||||
return URL.reparingIfRequired(rawLink)
|
||||
return URL.repairingIfRequired(rawLink)
|
||||
}
|
||||
|
||||
var externalURL: URL? {
|
||||
return URL.reparingIfRequired(rawExternalLink)
|
||||
return URL.repairingIfRequired(rawExternalLink)
|
||||
}
|
||||
|
||||
var imageURL: URL? {
|
||||
return URL.reparingIfRequired(rawImageLink)
|
||||
return URL.repairingIfRequired(rawImageLink)
|
||||
}
|
||||
|
||||
var link: String? {
|
||||
|
|
|
@ -39,7 +39,7 @@ extension URL {
|
|||
|
||||
}
|
||||
|
||||
static func reparingIfRequired(_ link: String?) -> URL? {
|
||||
static func repairingIfRequired(_ link: String?) -> URL? {
|
||||
// If required, we replace any space characters to handle malformed links that are otherwise percent
|
||||
// encoded but contain spaces. For performance reasons, only try this if initial URL init fails.
|
||||
guard let link = link, !link.isEmpty else { return nil }
|
||||
|
|
Loading…
Reference in New Issue