From 7167f0a3f0cdc92f675f0022e6f71521dff347aa Mon Sep 17 00:00:00 2001 From: Serhat Bolsu Date: Fri, 1 Jul 2022 23:30:07 +0400 Subject: [PATCH] Markdown with new line support[D --- Sources/ExpandableText/ExpandableText.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/ExpandableText/ExpandableText.swift b/Sources/ExpandableText/ExpandableText.swift index e083c61..5055ef3 100644 --- a/Sources/ExpandableText/ExpandableText.swift +++ b/Sources/ExpandableText/ExpandableText.swift @@ -12,7 +12,7 @@ public struct ExpandableText: View { @available(iOS 15, *) var markdownText: AttributedString { - (try? AttributedString(markdown: text)) ?? AttributedString() + (try? AttributedString(markdown: text, options: AttributedString.MarkdownParsingOptions(interpretedSyntax: .inlineOnlyPreservingWhitespace))) ?? AttributedString() } var font: Font = .body