Skip to content
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

Truncate too early on 80 character width terminal #15

Open
simonschaufi opened this issue Apr 23, 2020 · 6 comments
Open

Truncate too early on 80 character width terminal #15

simonschaufi opened this issue Apr 23, 2020 · 6 comments

Comments

@simonschaufi
Copy link

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 ...

> |----------------------------------------------------------------------------|
@dantleech
Copy link
Owner

dantleech commented Apr 23, 2020

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

@simonschaufi
Copy link
Author

Looking at the class, I found a lot more bugs as lots of tags (info, comment) are not closed properly

@dantleech
Copy link
Owner

</>? that's valid if that's what you mean?

@simonschaufi
Copy link
Author

simonschaufi commented Apr 23, 2020

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.

@dantleech
Copy link
Owner

yes -- that's because we truncate the string with the formatting tags - maybe there is a good solution for this in Symfony, not sure.

@simonschaufi
Copy link
Author

simonschaufi commented Apr 23, 2020

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.

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

No branches or pull requests

2 participants