Closed dmitshur closed 10 years ago
Could you please check latest commits?
Trying right now, and I expect it to work (having looked at the src change).
$ goe "runewidth.IsEastAsian()"
(bool)(true)
But I'm on a US setup. That doesn't seem right. Since that's returning true, the width of EN DASH is still 2 instead of 1.
Some more information for reference:
$ goe 'os.Getenv("LANG")'
(string)("en_US.UTF-8")
Ooops, Fixed.
BTW, what is goe? I want it.
Ah, I found it. https://github.com/shurcooL/goe
Now it works! Thanks!
Thank you
Hi,
Consider the following three similar unicode characters:
From https://github.com/shurcooL/markdownfmt/issues/7#issuecomment-46792756, I've learned that
go-runewidth
considers the width of the first character to be 1, and the width of second and third characters to be 2.Is that intended?
I'm not sure how to test this reliably, but in most environments it seems that EN DASH has width that's closer to 1 than 2.
Any thoughts on this?