Skip to content

Commit 243db27

Browse files
bug #54009 [Console] Fix display of vertical Table on Windows OS (VincentLanglet)
This PR was merged into the 6.4 branch. Discussion ---------- [Console] Fix display of vertical Table on Windows OS | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exists, explain below instead --> | License | MIT Similar to #54001 but the feature was introduced in 6.4 with #50691 Commits ------- e9b0faa Fix vertical table on windows
2 parents faac38c + e9b0faa commit 243db27

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy