Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-line string handling in Text views #400

Closed
disc0infern0 opened this issue May 13, 2021 · 0 comments · Fixed by #401
Closed

Multi-line string handling in Text views #400

disc0infern0 opened this issue May 13, 2021 · 0 comments · Fixed by #401
Assignees
Labels
bug Something isn't working

Comments

@disc0infern0
Copy link

disc0infern0 commented May 13, 2021

New line characters are ignored by the Text() view;-
e.g.

struct ContentView: View {
    let longtext="""
Hello Max!
Hello Carson!
Hello Jed!
"""
    var body: some View {
        Text(longtext)
    }
}

produces the following output:
Hello Max! Hello Carson! Hello Jed!

New line "\n" characters are also ignored.

It can be worked around, but it would be great if this could be fixed.

@carson-katri carson-katri added the bug Something isn't working label May 13, 2021
@carson-katri carson-katri self-assigned this May 13, 2021
@MaxDesiatov MaxDesiatov linked a pull request May 13, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

2 participants