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

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

Copy link
Copy link
Closed
@leofeyer

Description

@leofeyer
Issue body actions

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

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