Use the correct key when caching attributed string builder results.
This commit is contained in:
@@ -104,7 +104,7 @@ struct AttributedStringBuilderV1: AttributedStringBuilderProtocol {
|
||||
removeDTCoreTextArtifacts(mutableAttributedString)
|
||||
|
||||
let result = try? AttributedString(mutableAttributedString, including: \.elementX)
|
||||
Self.cacheValue(result, forKey: htmlString, cacheKey: cacheKey)
|
||||
Self.cacheValue(result, forKey: originalHTMLString, cacheKey: cacheKey)
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ struct AttributedStringBuilderV2: AttributedStringBuilderProtocol {
|
||||
addMatrixEntityPermalinkAttributesTo(mutableAttributedString)
|
||||
|
||||
let result = try? AttributedString(mutableAttributedString, including: \.elementX)
|
||||
Self.cacheValue(result, forKey: htmlString, cacheKey: cacheKey)
|
||||
Self.cacheValue(result, forKey: originalHTMLString, cacheKey: cacheKey)
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user