Closed
Description
Q | A |
---|---|
Bug report? | yes |
Feature request? | no |
BC Break report? | yes (I think?) |
RFC? | no |
Symfony version | 3.2.1 |
I'm very late to the Symfony 3 upgrade game, but in comparison to Symfony 2.8, this code behaves differently:
$io = new SymfonyStyle($input, $output);
$io->confirm('Are you sure you want to <comment>something</comment>');
Expected output is that the word "something" has a different color, instead the output is as follows:
Are you sure you want to <comment>something</comment> (yes/no) [yes]:
>
This is due to this commit. From the tests, it seems like the escape was added just for backslashes and not really intended to also escape formatting.
Maybe this is too late into Symfony 3 to change this behavior, but it is handy to be able to emphasize words in questions.