Skip to content

Commit 1894919

Browse files
Merge branch '4.4' into 5.4
* 4.4: [Console] Fixes "Incorrectly nested style tag found" error when using multi-line header content Fix LDAP connection options [Security/Http] Ignore invalid URLs found in failure/success paths
2 parents 441c306 + cce7a9f commit 1894919

File tree

2 files changed

+23
-3
lines changed

2 files changed

+23
-3
lines changed

Helper/Table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ private function buildTableRows(array $rows): TableRows
623623
}
624624
$escaped = implode("\n", array_map([OutputFormatter::class, 'escapeTrailingBackslash'], explode("\n", $cell)));
625625
$cell = $cell instanceof TableCell ? new TableCell($escaped, ['colspan' => $cell->getColspan()]) : $escaped;
626-
$lines = explode("\n", str_replace("\n", "<fg=default;bg=default>\n</>", $cell));
626+
$lines = explode("\n", str_replace("\n", "<fg=default;bg=default></>\n", $cell));
627627
foreach ($lines as $lineKey => $line) {
628628
if ($colspan > 1) {
629629
$line = new TableCell($line, ['colspan' => $colspan]);

Tests/Helper/TableTest.php

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -616,8 +616,8 @@ public function renderProvider()
616616
'default',
617617
<<<'TABLE'
618618
+-------+------------+
619-
[39;49m| [39;49m[37;41mDont break[39;49m[39;49m |[39;49m
620-
[39;49m| [39;49m[37;41mhere[39;49m |
619+
[37;41m| [39;49m[37;41mDont break[39;49m[37;41m |[39;49m
620+
[37;41m| here[39;49m |
621621
+-------+------------+
622622
| foo | Dont break |
623623
| bar | here |
@@ -1285,6 +1285,26 @@ public function renderSetTitle()
12851285
| 80-902734-1-6 | And Then There Were None | Agatha Christie |
12861286
+---------------+--------- Page 1/2 -------+------------------+
12871287

1288+
TABLE
1289+
,
1290+
true,
1291+
],
1292+
'header contains multiple lines' => [
1293+
'Multiline'."\n".'header'."\n".'here',
1294+
'footer',
1295+
'default',
1296+
<<<'TABLE'
1297+
+---------------+---- Multiline
1298+
header
1299+
here -+------------------+
1300+
| ISBN | Title | Author |
1301+
+---------------+--------------------------+------------------+
1302+
| 99921-58-10-7 | Divine Comedy | Dante Alighieri |
1303+
| 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens |
1304+
| 960-425-059-0 | The Lord of the Rings | J. R. R. Tolkien |
1305+
| 80-902734-1-6 | And Then There Were None | Agatha Christie |
1306+
+---------------+---------- footer --------+------------------+
1307+
12881308
TABLE
12891309
],
12901310
[

0 commit comments

Comments
 (0)