Skip to content

Commit

Permalink
Fix border when there are no headers
Browse files Browse the repository at this point in the history
  • Loading branch information
jessarcher committed Sep 14, 2023
1 parent 9339793 commit 870e74f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Themes/Default/TableRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,15 @@ public function __invoke(Table $table): string
$tableStyle = (new TableStyle())
->setHorizontalBorderChars('')
->setVerticalBorderChars('', '')
->setCrossingChars('', '<fg=gray>┌', '', '', '', '┘</>', '', '', '')
->setCellHeaderFormat($this->dim('<fg=default>%s</>'))
->setCellRowFormat('<fg=default>%s</>');

if (empty($table->headers)) {
$tableStyle->setCrossingChars('', '', '', '', '', '┘</>', '', '', '', '<fg=gray>┌', '', '');
} else {
$tableStyle->setCrossingChars('', '<fg=gray>┌', '', '', '', '┘</>', '', '', '');
}

$buffered = new BufferedConsoleOutput();

(new SymfonyTable($buffered))
Expand Down

0 comments on commit 870e74f

Please sign in to comment.