what-changed
what-changed copied to clipboard
Truncate too early on 80 character width terminal
I have a 80 character terminal in ubuntu and the commit message is truncated way too early. For comparison I added a line below to see how much space there is still available.
dantleech/what-changed: 9 updated
laravel/framework 8299b6dc..4de12917
[2020-03-26 16:43:40] 3c692967 ThomasTrost ...
> |----------------------------------------------------------------------------|
hmm, I guess this is the culprit: https://github.com/dantleech/what-changed/blob/master/lib/Adapter/Symfony/Report/ConsoleReport.php
not sure why I truncate at <Terminal Width> - 30
Looking at the class, I found a lot more bugs as lots of tags (info, comment) are not closed properly
</>? that's valid if that's what you mean?
I haven't seen this kind of closing tag in symfony console yet.
In lots of cases I see a line like this in the output: [2020-04-03 05:57:47] 6f19efdc sebastianbergmann</com... and as you can see, the closing tag is also truncated. That's what I mean.
yes -- that's because we truncate the string with the formatting tags - maybe there is a good solution for this in Symfony, not sure.
Maybe ignore the counting of additional characters while you are in a tag and then only count the characters outside. The main point of this issue is the total length. What i mentioned now is actually another bug.