Post

Replies

Boosts

Views

Activity

Reply to New lines not being rendered in SwiftUI's markdown
This issue appears to have been fixed on Monterey Beta 3. You have to add the .inlineOnlyPreservingWhitespace option when initialising the AttributedString. struct MarkdownTest: View {     let attrStr = try! AttributedString(markdown: "Hello **World**!\n[This is a link](www.google.com)", options: AttributedString.MarkdownParsingOptions(interpretedSyntax: .inlineOnlyPreservingWhitespace))     var body: some View {         Text(attrStr)             .padding()     } }
Jul ’21