Markdown openURL can not handle property url

I'm trying to render a markdown with a link using Text. If the URL of the link is a static string, then no problem. If the URL is a property, then OpenURLAction gets a string ‘%25@’. I think this may be a bug.

struct ContentView: View {
let url = "https://www.google.com"
var body: some View {
Text("[Terms of Service](\(url))")
.environment(\.openURL, OpenURLAction(handler: { url in
print(url)
return .handled
}))
}
}

It should be a bug, maybe try this

var str: AttributedString {
try! AttributedString(markdown: "[Terms of Service](\(url))")
}
Text(str1)

Used want to use the Link modifier to navigate to a URL and provide a title.

Markdown openURL can not handle property url
 
 
Q