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

Fix to operate in consideration of grapheme cluster in Text #169

Closed
wants to merge 1 commit into from

Conversation

hackerwins
Copy link
Member

@hackerwins hackerwins commented Mar 24, 2021

What this PR does / why we need it?

Fix to operate in consideration of grapheme cluster in Text.

Any background context you want to provide?

#167 (comment)

What are the relevant tickets?

Fixes #167
Fixes yorkie-team/yorkie#110

Checklist

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

@codecov
Copy link

codecov bot commented Mar 24, 2021

Codecov Report

Merging #169 (bc49320) into main (2ffbba3) will increase coverage by 0.08%.
The diff coverage is 94.73%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #169      +/-   ##
==========================================
+ Coverage   78.60%   78.68%   +0.08%     
==========================================
  Files          48       48              
  Lines        2725     2740      +15     
  Branches      446      447       +1     
==========================================
+ Hits         2142     2156      +14     
- Misses        415      416       +1     
  Partials      168      168              
Impacted Files Coverage Δ
src/document/json/plain_text.ts 78.68% <91.66%> (+3.17%) ⬆️
src/api/converter.ts 81.57% <100.00%> (ø)
src/document/json/rich_text.ts 65.00% <100.00%> (+1.08%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2ffbba3...bc49320. Read the comment docs.

@hackerwins
Copy link
Member Author

I had Agent calculate text in UTF-16 code units in the same way as in JavaScript.
yorkie-team/yorkie#165

@hackerwins hackerwins closed this Mar 24, 2021
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.

Grapheme cluster in Text Got 'panic: offset should be less than or equal to length' when inserting emoji
1 participant