bug #14600 [Console] SymfonyStyle: fix block rpadding when escaping '<' (ogizanagi)
This PR was merged into the 2.7 branch.
Discussion
----------
[Console] SymfonyStyle: fix block rpadding when escaping '<'
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
![screenshot 2015-05-10 a 20 37 46](https://cloud.githubusercontent.com/assets/2211145/7555745/4dfbfd58-f755-11e4-98c4-3c42bb71abd3.PNG)
Commits
-------
80fc341
[Console] SymfonyStyle: fix block rpadding when escaping '<'
This commit is contained in:
commit
c477c5b395
@ -85,7 +85,7 @@ class SymfonyStyle extends OutputStyle
|
|||||||
|
|
||||||
foreach ($lines as &$line) {
|
foreach ($lines as &$line) {
|
||||||
$line = sprintf('%s%s', $prefix, $line);
|
$line = sprintf('%s%s', $prefix, $line);
|
||||||
$line .= str_repeat(' ', $this->lineLength - Helper::strlen($line));
|
$line .= str_repeat(' ', $this->lineLength - Helper::strlenWithoutDecoration($this->getFormatter(), $line));
|
||||||
|
|
||||||
if ($style) {
|
if ($style) {
|
||||||
$line = sprintf('<%s>%s</>', $style, $line);
|
$line = sprintf('<%s>%s</>', $style, $line);
|
||||||
|
Reference in New Issue
Block a user