casperdcl/git-fame

Table gets misaligned if author names contain fullwidth characters

waldyrious opened this issue · 2 comments

I had previously reported this to oleander/git-fame-rb#95, and just checked that this issue also occurs in this project. Quoting myself from that issue:

Running git fame in the a repository with authors whose names contain fullwidth characters (like Chinese, Japanese or Korean characters) results in incorrect alignment of the table.

For example, here's the (truncated) output for the https://github.com/oilshell/oil repo:

| Author                  |     loc |   coms |   fils |  distribution   |
|:------------------------|--------:|-------:|-------:|:----------------|
| Andy Chu                | 1693341 |   5111 |   4407 | 98.6/93.1/87.3  |
| Andy C                  |   15372 |    189 |    247 | 0.9/ 3.4/ 4.9   |
| granttrec               |    2288 |      6 |    103 | 0.1/ 0.1/ 2.0   |
| :                       |       : |      : |      : | :               |
| Aleks Kamko             |     114 |      2 |      8 | 0.0/ 0.0/ 0.2   |
| Matt Singletary         |      85 |      1 |      2 | 0.0/ 0.0/ 0.0   |
| Crestwave               |      74 |      1 |      2 | 0.0/ 0.0/ 0.0   |
| 조성빈                     |      73 |      1 |      3 | 0.0/ 0.0/ 0.1   |
| Batuhan Taskaya         |      72 |      1 |      6 | 0.0/ 0.0/ 0.1   |
| Yorwba                  |      70 |      8 |      9 | 0.0/ 0.1/ 0.2   |
| myfreeweb               |      60 |      1 |     58 | 0.0/ 0.0/ 1.1   |
| :                       |       : |      : |      : | :               |
| Rory O’Kane             |       0 |      1 |      0 | 0.0/ 0.0/ 0.0   |
| Waldir Pimenta          |       0 |      1 |      0 | 0.0/ 0.0/ 0.0   |
| joris                   |       0 |      2 |      0 | 0.0/ 0.0/ 0.0   |

This is probably related to #53, by the way.

going to close as duplicate of #53