Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Handle zero-width spaces correctly #20

Closed
wants to merge 2 commits into from
Closed

Handle zero-width spaces correctly #20

wants to merge 2 commits into from

Conversation

r0wanda
Copy link

@r0wanda r0wanda commented Jun 22, 2024

Zero width spaces are currently counted as 1 character, despite not being displayed as 1, even in monospace fonts.

@sindresorhus
Copy link
Owner

The existing logic is correct. This package counts characters. I think you want my https://github.com/sindresorhus/string-width package instead.

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

Successfully merging this pull request may close these issues.

2 participants