Skip to content

Nested struct pattern formatting could be shorter #941

@JonasWanke

Description

@JonasWanke

Input

[
  colors,
  controlSequences,
  GraphicRenditions:
    [
      setForegroundColor3Or4Bit,
      setBrightForegroundColor3Or4Bit,
      setForegroundColor8Or24Bit,
      setBackgroundColor3Or4Bit,
      setBrightBackgroundColor3Or4Bit,
      setBackgroundColor8Or24Bit,
    ],
] = use "AnsiEscapeSequences"

Actual Output

[
  colors,
  controlSequences,
  GraphicRenditions:
    [
      setForegroundColor3Or4Bit,
      setBrightForegroundColor3Or4Bit,
      setForegroundColor8Or24Bit,
      setBackgroundColor3Or4Bit,
      setBrightBackgroundColor3Or4Bit,
      setBackgroundColor8Or24Bit,
    ],
] = use "AnsiEscapeSequences"

Desired Output

[
  colors,
  controlSequences,
  GraphicRenditions: [
    setForegroundColor3Or4Bit,
    setBrightForegroundColor3Or4Bit,
    setForegroundColor8Or24Bit,
    setBackgroundColor3Or4Bit,
    setBrightBackgroundColor3Or4Bit,
    setBackgroundColor8Or24Bit,
  ],
] = use "AnsiEscapeSequences"

Relevant Logs

No response

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions