変数に格納したマークダウンを表示する
変数に格納したマークダウンを表示する方法です。
ContentView.swift
import SwiftUI
struct ContentView: View {
let markdownText: String = "**Snorlax** is the **most** cute pokemon!\n[About Snorlax](https://en.wikipedia.org/wiki/Snorlax)"
var body: some View {
Text(LocalizedStringKey(markdownText))
}
}
#Preview {
ContentView()
}
