Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@mislav
Copy link
Contributor

@mislav mislav commented Sep 2, 2020

These characters get classified as "EastAsianAmbiguous" by Go's text/width package, and thus assumed that their printed version occupies a width of 2 characters, whereas they each only occupy one.

I'm not sure why they are classified as East Asian, but I did not have the energy to dive into Go's Unicode tables, so here is a workaround based on an exclusion list.

This affects all TablePrinter output, therefore commands such as issue/pr list.

These characters get classified as "East Asian Mixed" by Go's
`text/width` package, and thus assumed that their printed version
occupies a width of 2 characters, whereas they each only occupy one.

I'm not sure why they are classified as East Asian, but I did not have
the energy to dive into Go's Unicode tables, so here is a workaround
based on an exclusion list.
@vilmibm
Copy link
Contributor

vilmibm commented Sep 3, 2020

ah, I guess this is why the dot was messing up formatting when I tried to use it in pr checks. We can switch to that it in the future, then. Thanks for the investigation.

@mislav mislav merged commit 6ceea6e into trunk Sep 4, 2020
@mislav mislav deleted the display-width-punctuation branch September 4, 2020 14:04
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.

2 participants