-
Notifications
You must be signed in to change notification settings - Fork 118
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
Replace tabs in tables with 4 spaces #181
Conversation
I tested this but I don't think it works properly because of the existing logic. Right now it only directly modifies $row to use $value if this condition is met : php-cli-tools/lib/cli/table/Ascii.php Line 144 in 77616d6
But if it isn't, then it just uses the original $row data to calculate padding: php-cli-tools/lib/cli/table/Ascii.php Lines 168 to 172 in 77616d6
So it doesn't know about the tab replacement always. I saw this in two ways when testing with the value When I first added it, output looked like this:
Which seemed odd. Then when I added a longer string as another value, the table gets broken by the tab row again:
Maybe a better place for this fix would be to modify php-cli-tools/lib/cli/table/Ascii.php Lines 200 to 202 in 77616d6
To make sure it always removes tabs from the content no matter what |
Yes that makes more sense, thanks! |
While testing #179, I realized that tabs (
\t
) have always slightly messed up table formatting due to tab length.By replacing them with spaces, the length calculation is correct again.