-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
inconsistent handling of graphemes π©π½βπΎπ§π§ββοΈπ¦ΉββοΈπ§π§πΎββοΈ #73
Comments
Requires an external library https://crates.io/crates/unicode-segmentation since CC @laysauchoa |
Since graphemes are not even displayed in vscode, I think it's safe to say that operations on unicode chars is sufficient. |
CC @drahnr My vscode actually shows emojis and I see that it gets read as it was a misspelled word. although, I am not sure if it is common to use emojis in documentation. ^^ |
It's more common than you'd expect, and you can see the issue already above, it should be one |
@laysauchoa this should not be the case anymore, is it? |
cc @drahnr yes ^^, this is not the case anymore.
How did it ignore emoji now or do not recognize as an error? Just curious! Although, would this issue still be relevant due to some misalignment when emojis are present?
|
Would you like to look into the offset issue, I would have expected this to be ok with the Could you create a PR with an |
Hi @drahnr. Do you mean the offset issue when the emojis are being used, such as the example above? Do you mean a test such as those ones [0]? If yes, then yes, I can try to add. If not, please give me more info, and I will check it. |
Yes, that's what I meant :) |
The largest remaining issue here is that the display of graphemes might be individual smilies but also combined into a single character so the width / offset of |
This is an edge case, and unless somebody actually uses graphemes AND a terminal that can display them, this won't be an issue. This is not on the agenda for any-time-soonβ’. Closing. |
Describe the bug
In various places, the length used for offset calculation is used in bytes, which breaks Dow when multicharacter graphemes are used in literals.
To Reproduce
Currently there is a lack of unit tests to cover this issue sufficiently ( = none)
Expected behavior
Spans must be calculated based on graphemes (superset of chars) OR bytes consistently.
The text was updated successfully, but these errors were encountered: