I would like to write some Markdown text in a SwiftUI view in a Mac app. I need to support math expressions with $...$ and $$...$$ along with inline code and code blocks. How can I do syntax highlighting of the Markdown content? Any Swift packages that provide this feature?

#macOS #Mac #swiftlang #swiftui

GitHub - gonzalezreal/textual: Render and customize rich attributed text in SwiftUI

Render and customize rich attributed text in SwiftUI - gonzalezreal/textual

GitHub
@JTostitos It looks like Textual renders markdown in a SwiftUI view. But what I'm looking for is syntax highlighting of the raw markdown in an editor like view. I don't think Textual does this but please correct me if I'm wrong.
@wigging ah yeah sorry i haven’t actually used this yet (using the original - MarkdownUI; still need to update to this) but i think your right. This only renders the final output I believe.