I'm trying to give different color for underlined text in the AttributedString. as per this example.
But the result with this snippet of code:
var attributedString = try AttributedString(markdown: self)
if let rangeWord = self.slice(from: "[", to: "]") {
let range = attributedString.range(of: rangeWord)!
attributedString[range].underlineStyle = .single
attributedString[range].foregroundColor = .white
attributedString[range].underlineColor = .green
}
Is not what is expected
Is there a workaround it?