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

Support UTF16 Code Units in yorkie.Tree #545

Merged
merged 1 commit into from
Jun 8, 2023
Merged

Conversation

krapie
Copy link
Member

@krapie krapie commented Jun 7, 2023

What this PR does / why we need it:

Support UTF16 code units with rune in yorkie.Tree.

This is to support yorkie.Tree to handle multilingual.

Because previous yorkie.Tree did not support this, there was a bug when splitting text nodes that contains other languages like Korean (eg: splitting text node 한글 with offset of 2 resulted something like , , ��).

And because of this, tree structure got corrupted, leading to misbehavior of tree edit operation and failure of snapshot(bytes) conversion.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


Additional documentation:


Checklist:

  • Added relevant tests or not required
  • Didn't break anything

@krapie krapie added the bug 🐞 Something isn't working label Jun 7, 2023
@krapie krapie requested a review from hackerwins June 7, 2023 15:50
@krapie krapie self-assigned this Jun 7, 2023
Copy link
Member

@hackerwins hackerwins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution.

@hackerwins hackerwins merged commit 931b70d into main Jun 8, 2023
@hackerwins hackerwins deleted the tree-utf16-code-units branch June 8, 2023 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐞 Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants