-
-
Save dennda/3f9b31f873b20677b70c499f083f1be2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/DuolingoMobile/Sources/Explanations/StyledString.swift b/DuolingoMobile/Sources/Explanations/StyledString.swift | |
index 012e1ff3d..90fc0af5c 100644 | |
--- a/DuolingoMobile/Sources/Explanations/StyledString.swift | |
+++ b/DuolingoMobile/Sources/Explanations/StyledString.swift | |
@@ -135,6 +135,16 @@ struct StyledString: Decodable { | |
attributedString.addAttributes(attributes, range: range) | |
} | |
+ if attributedString.string.hasSuffix("manzana") { | |
+// attributedString.replaceCharacters(in: NSRange(location: 0, length: 9), with: " ") | |
+ | |
+ let invisibilityAttributes: [NSAttributedStringKey: Any] = [ | |
+ .foregroundColor: UIColor.clear | |
+ ] | |
+ let invisiblePeriod = NSAttributedString(string: ".", attributes: invisibilityAttributes) | |
+ attributedString.insert(invisiblePeriod, at: 0) | |
+ } | |
+ | |
return attributedString.copy() as! NSAttributedString | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment