gonzalezreal / swift-markdown-ui

Display and customize Markdown text in SwiftUI
MIT License
2.44k stars 298 forks source link

Need help to line wrap code blocks #257

Closed NunoLemos101 closed 1 year ago

NunoLemos101 commented 1 year ago

Hello,

Sorry to reach out this way but I tried to contact you from LinkedIn and Twitter.

Basically I have some markdown that has code blocks and I want the code blocks to line wrap when they reach the end of the screen rather than the user having to scroll horizontally with the finger.

I would like to know if that's possible to do with some customization.

Thank you, Nuno Lemos

gonzalezreal commented 1 year ago

Hi @NunoLemos101,

Yes, it is possible to customize this behavior. One of the code snippets in this post shows how to customize code blocks. To wrap the lines, you must remove the ScrollView.

If you have any other questions in the future, please use the Discussions section instead of opening a pull request.