From 19ead06e4c829ba66086a012c7474de0d1bdfb89 Mon Sep 17 00:00:00 2001 From: Michael Griebling Date: Wed, 18 Jan 2023 09:38:31 -0500 Subject: [PATCH] Another update. --- Sources/SwiftMathRender/MathRender/MTMathListDisplay.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/SwiftMathRender/MathRender/MTMathListDisplay.swift b/Sources/SwiftMathRender/MathRender/MTMathListDisplay.swift index ff519a7..4455d39 100644 --- a/Sources/SwiftMathRender/MathRender/MTMathListDisplay.swift +++ b/Sources/SwiftMathRender/MathRender/MTMathListDisplay.swift @@ -149,7 +149,7 @@ class MTCTLineDisplay : MTDisplay { override var textColor: MTColor? { set { super.textColor = newValue - let attrStr = NSMutableAttributedString(attributedString: self.attributedString!) + let attrStr = attributedString!.mutableCopy() as! NSMutableAttributedString let foregroundColor = NSAttributedString.Key(kCTForegroundColorAttributeName as String) attrStr.addAttribute(foregroundColor, value:self.textColor!.cgColor, range:NSMakeRange(0, attrStr.length)) self.attributedString = attrStr