isak.me - a blog by isak solheim

Bi-weekly updates about things that interest me, things I have built and things I have learned.

SwiftUI Markdown Text

Rendering markdown in a SwiftUI Text view is supported by default:

Text("# This is a heading\n*italic*")

If you are rendering text from a variable, wrap it inside a LocalizedStringKey:

Text(LocalizedStringKey(markdown))