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

Allow customizing soft break mode #342

Merged
merged 4 commits into from
Aug 12, 2024

Conversation

freak4pc
Copy link
Contributor

@freak4pc freak4pc commented Aug 9, 2024

Hey @gonzalezreal :)
I wanted to put up a quick PR to make sure this direction is acceptable to you.

If yes, I'll add some tests and prepare it for merging.

Thank you!

Resolved #341

@gonzalezreal
Copy link
Owner

Hey @freak4pc,

This pull request goes in the right direction 💪🏽.

You will probably need to update AttributedStringInlineRenderer as well. TextInlineRenderer only works with the first level of inlines. It is a hack to enable inline images by leveraging Text.init(_ image: Image). Nested inlines are rendered by the AttributedStringInlineRenderer.

Let me know if you need any further clarification.

Thanks!

@freak4pc
Copy link
Contributor Author

freak4pc commented Aug 9, 2024

Should be good to go, let me know what you think @gonzalezreal
One point is that I'm running Xcode 16 for the snapshot tests so they're all failing, I don't have access to Xcode 14.2 like the CI runs (also problematic since it won't even run on macOS Mojave for me :P). Perhaps you could run it locally somehow?

@gonzalezreal
Copy link
Owner

Xcode version shouldn't be an issue as long as you can create an iOS 16.2 iPhone SE (3rd generation) simulator, which is the one used to generate the snapshot images. You can use these ones:

testSoftBreakModeLineBreak.1 testSoftBreakModeSpace.1

@freak4pc
Copy link
Contributor Author

@gonzalezreal Pushed your files. Thanks :)

@gonzalezreal
Copy link
Owner

Awesome contribution. Thanks, @freak4pc!

@gonzalezreal gonzalezreal merged commit 5544181 into gonzalezreal:main Aug 12, 2024
1 check passed
@freak4pc
Copy link
Contributor Author

Thank you for the prompt review! 🙏

@freak4pc freak4pc deleted the soft-break-mode branch August 12, 2024 09:08
@freak4pc
Copy link
Contributor Author

One final ask, any chance for a release cut when you have a moment? ^_^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New lines are concatenated and not broken, need two lines
2 participants