Removing markdown breaks other things so revert for now
This reverts commit 366d46dfab.
This commit is contained in:
@@ -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)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user