Skip to content

Incorrect table column width calculcations with colorized strings.#4249

Merged
danielbachhuber merged 4 commits intowp-cli:masterfrom
gitlost:issue_php_cli_tools_106
Jul 26, 2017
Merged

Incorrect table column width calculcations with colorized strings.#4249
danielbachhuber merged 4 commits intowp-cli:masterfrom
gitlost:issue_php_cli_tools_106

Conversation

@gitlost
Copy link
Contributor

@gitlost gitlost commented Jul 26, 2017

Issue wp-cli/php-cli-tools#106

This uses the pre-colorized stuff added in wp-cli/php-cli-tools#111. Adds ascii_pre_colorized arg to the various display functions in Formatter which eventually gets passed to show_table() which just calls Table::setAsciiPreColorized() with it.

So if you have an Ascii table with some pre-colorized columns you can do eg $table->display_items( $items, array( true, false, true ) ) to indicate that the padding should be adjusted for them.

@danielbachhuber danielbachhuber merged commit d51f6d3 into wp-cli:master Jul 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants