Skip to content

Commit

Permalink
bug #54009 [Console] Fix display of vertical Table on Windows OS (Vin…
Browse files Browse the repository at this point in the history
…centLanglet)

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 symfony/symfony#54001
but the feature was introduced in 6.4 with symfony/symfony#50691

Commits
-------

e9b0faaec5 Fix vertical table on windows
  • Loading branch information
nicolas-grekas committed Feb 20, 2024
2 parents cb3239f + 155f2f3 commit a9174b6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Helper/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,8 @@ public function render()
for ($i = 0; $i < $maxRows; ++$i) {
$cell = (string) ($row[$i] ?? '');

$parts = explode("\n", $cell);
$eol = str_contains($cell, "\r\n") ? "\r\n" : "\n";
$parts = explode($eol, $cell);
foreach ($parts as $idx => $part) {
if ($headers && !$containsColspan) {
if (0 === $idx) {
Expand Down

0 comments on commit a9174b6

Please sign in to comment.