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 multiple emojis in a row causing additional empty tokens being added #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tomaskukk
Copy link

Fix multiple emojis in a row causing empty tokens being added to the list being iterated.

Issue is that emojis can can count as multiple characters when doing "string".length as it checks the count of UTF-16 units.

Fix this by spreading the string to a list and checking the list length.

closes: #15

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.

[BUG]: Strings starting with emojis cause additional whitespace in encoding
1 participant