Closed
Description
This is a follow-up on #13220 created by @wouterj. The problem is in line 47:
// + 17 = 2 spaces + <info> + </info> + 2 spaces
preg_replace('/\s*[\r\n]\s*/', "\n".str_repeat(' ', $totalWidth + 17), $argument->getDescription()),
While the whitespace calculation might be correct for the unit test, where the <info>
tags are simply output, it is certainly wrong for a decorated console, where the <info>
tags are converted.
The calculation should be // + 4 = 2 spaces + 2 spaces
so it is $totalWidth + 4
, then the spacing will be correct.