This repository has been archived by the owner on Sep 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
Link layout issues #3
Comments
Also seeing this issue |
Yes this is currently a limitation with SwiftUI. As soon as we add a modifier to text to allow for a clickable link, it becomes a view and we can no longer compose the text. So in this case links become their own line. We could fix this by dipping into UIKit for the links. Unfortunately I don’t have a ton of time to look at this at the moment, but contributions are welcome! |
I had a go at writing my own CommonMark Text widget in SwiftUI and also hit this problem, as Andre mentioned it is due to the way SwiftUI works, hopefully we get more support for attributed strings in SwiftUI 2.0 or even a wrap around stack which means we could mix Buttons and Text. |
@acarrera94 that makes sense, thanks for the response 👍🏻 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This is how the text is supposed to be laid out:
But this is what happens to links:
The text was updated successfully, but these errors were encountered: