Skip to content

Array with block requires formatting twice #361

Open
@ryanb

Description

@ryanb

Given the following Ruby code.

["fooooooooooooooooooooooooooooooooo", "baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaar"].map.with_index { |token, index| puts "Foo" }

Running the formatter once produces this.

%w[fooooooooooooooooooooooooooooooooo baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaar].map
  .with_index { |token, index| puts "Foo" }

Running it again produces this.

%w[fooooooooooooooooooooooooooooooooo baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaar]
  .map
  .with_index { |token, index| puts "Foo" }

This is with the default settings (80 line width).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions