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

Introduce MarkdownRange class on iOS #555

Merged
merged 1 commit into from
Dec 4, 2024
Merged

Conversation

tomekzaw
Copy link
Collaborator

@tomekzaw tomekzaw commented Dec 4, 2024

Details

This PR adds an intermediate step in formatting NSAttributedString on iOS. Instead of using jsi::Value from parser directly, first we populate markdownRanges array consisting of MarkdownRange objects. Then, we call applyRangeToAttributedString while iterating over the array.

The main benefit is that now we can memoize the parser output on the native side since holding jsi::Value is not recommended. It will also make it simpler to split the implementation into smaller parts.

Related Issues

GH_LINK

Manual Tests

Linked PRs

@tomekzaw tomekzaw requested a review from j-piasecki December 4, 2024 14:48
@tomekzaw tomekzaw merged commit 14e59f1 into main Dec 4, 2024
5 checks passed
@tomekzaw tomekzaw deleted the @tomekzaw/ios-markdown-range branch December 4, 2024 16:21
@os-botify
Copy link
Contributor

os-botify bot commented Dec 4, 2024

🚀 Published to npm in 0.1.190 🎉

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.

2 participants