Removing markdown breaks other things so revert for now

This reverts commit 366d46dfab.
This commit is contained in:
William Casarin
2022-11-18 12:32:56 -08:00
parent 366d46dfab
commit 93798ea79e

View File

@@ -58,9 +58,15 @@ struct NoteContentView: View {
@State var artifacts: NoteArtifacts @State var artifacts: NoteArtifacts
func MainContent() -> some View { func MainContent() -> some View {
return VStack(alignment: .leading) { let md_opts: AttributedString.MarkdownParsingOptions =
Text(artifacts.content) .init(interpretedSyntax: .inlineOnlyPreservingWhitespace)
return VStack(alignment: .leading) {
if let txt = try? AttributedString(markdown: artifacts.content, options: md_opts) {
Text(txt)
} else {
Text(artifacts.content)
}
if show_images && artifacts.images.count > 0 { if show_images && artifacts.images.count > 0 {
ImageCarousel(urls: artifacts.images) ImageCarousel(urls: artifacts.images)
} }