Not all markdown elements work. The string will work if I do:
- "hello world" Italics
- "hello world" Bold
But NOT
- "hello world" Bold & Italics
There are others that also don't work such as headers and numbered lists.
let string: String = "***hello world***"
if let attributedString: AttributedString = try? AttributedString(markdown: string) {
let attributedText: NSMutableAttributedString = NSMutableAttributedString(attributedString)
myLabel.text = nil
myLabel.attributedText = attributedText
}