Skip to content

Formatting Issue: Multiline if Sometimes Indented 6 Spaces #943

@nicholasdower

Description

@nicholasdower

Originally reported in #915

Commit: 95210d7

Input

→ View on rubyfmt.run

if foo
  .bar
end

if foo < bar
  .baz
end

if foo = bar
  .baz
end

Output

if foo
    .bar
end

if foo < bar
      .baz
end

if foo = bar
    .baz
end

Expected behavior

I expected 4 spaces. I couldn't find any indication in the rubyfmt source that this is intentional.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions