Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 095d225

Browse filesBrowse files
authored
Correct line wrapping for decorated text in block output.
1 parent cc60600 commit 095d225
Copy full SHA for 095d225

File tree

Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed

‎src/Symfony/Component/Console/Style/SymfonyStyle.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Style/SymfonyStyle.php
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,8 @@ private function createBlock(iterable $messages, string $type = null, string $st
471471
$message = OutputFormatter::escape($message);
472472
}
473473

474-
$lines = array_merge($lines, explode(\PHP_EOL, wordwrap($message, $this->lineLength - $prefixLength - $indentLength, \PHP_EOL, true)));
474+
$decorationLength = Helper::strlen($message) - Helper::strlenWithoutDecoration($this->getFormatter(), $message);
475+
$lines = array_merge($lines, explode(\PHP_EOL, wordwrap($message, $this->lineLength - $prefixLength - $indentLength + $decorationLength, \PHP_EOL, true)));
475476

476477
if (\count($messages) > 1 && $key < \count($messages) - 1) {
477478
$lines[] = '';

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.