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.