Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e9b0faa

Browse files
Fix vertical table on windows
1 parent 0294563 commit e9b0faa

File tree

1 file changed

+2
-1
lines changed
  • src/Symfony/Component/Console/Helper

1 file changed

+2
-1
lines changed

src/Symfony/Component/Console/Helper/Table.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,8 @@ public function render()
365365
for ($i = 0; $i < $maxRows; ++$i) {
366366
$cell = (string) ($row[$i] ?? '');
367367

368-
$parts = explode("\n", $cell);
368+
$eol = str_contains($cell, "\r\n") ? "\r\n" : "\n";
369+
$parts = explode($eol, $cell);
369370
foreach ($parts as $idx => $part) {
370371
if ($headers && !$containsColspan) {
371372
if (0 === $idx) {

0 commit comments

Comments
 (0)