-
-
Notifications
You must be signed in to change notification settings - Fork 32
Some characters do false-positively count as 2 while occupying 1 column in terminal #56
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
Comments
More test cases where this happens,
|
I get the same issue with |
I got the same issue with |
Is there any solution besides sticking with Because version Cannot find package 'eastasianwidth' (This is because my workspace use both version 7.2.0 and 5.1.2 which NPM fails to properly install apparently) Update: For now I can fix NPM installation by explicitely adding "eastasianwidth": "^0.2.0", alongside string-width dep: {
"string-width": "5.1.2",
"eastasianwidth": "^0.2.0",
} |
stringWidth('◼') // 2 in v7, 1 in v5
stringWidth('⚠') // 2 in v7, 1 in v5
stringWidth('✔') // 2 in v7, 1 in v5
(likely not complete list)
seems related to
emoji-regex
package updatesI guess it is not true that every character considered as emoji due to spec occupies double width. At least at current moment in time.
mathiasbynens/emoji-regex#33
The text was updated successfully, but these errors were encountered: