Is there a way to get the Markdown string from an AttributedString? I have the following code:
let text = "**Hello** World!"
let attString = AttributedString(text)
Now I want to get back the Markdown string.
I did see that AttributedString includes a description call that attempts to address the problem, but it adds a set of brackets to the result:
print(attString.description)
Result:
**Hello** World! {
}
I thought there might be a better way of doing this.
As suggested by @paulo-mattos here is the solution: