Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Console] Wrong handling of multi-line argument descriptions #20237

Closed
@leofeyer

Description

@leofeyer

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions