Why isn’t markdwon implemented when text is passed as a variable?

import SwiftUI

struct ContentView: View { @State private var username: String = "" var pass: String = "hello" var body: some View {

    VStack {
        TextField("Hi", text: $username)
        
        Image(systemName: "globe")
            .imageScale(.large)
            .foregroundColor(.accentColor)
        Text(pass)
    }
}

}why isn’t markdwon automatically implemented here? It’s just a simple query to help me understand how it works :) help is greatly appreciated. PS: when i pass a string directly like Text(hello) then markdown is implemented and the text is made bold. …

You should use the code formatter tool to make your post easier to read…

struct ContentView: View {
    @State private var username: String = ""
    var pass: String = "hello"
    
    var body: some View {
        VStack {
            TextField("Hi", text: $username)
            
            Image(systemName: "globe")
                .imageScale(.large)
                .foregroundColor(.accentColor)
            Text(pass)
        }
    }
}

In Xcode you get this:

You see pass is green, because it is a var, it is not a literal.

.

why isn’t markdown automatically implemented here?

What are you expecting exactly ?

Why isn’t markdwon implemented when text is passed as a variable?
 
 
Q