Skip to content

Comment between lines breaks indentation #2944

Open
@pbiggar

Description

@pbiggar

Issue created from fantomas-online

Code

5 =
  // a comment
  5

Result

5 =
// a comment
5

Problem description

By not indenting the second line, reformatting creates incorrect code.

Extra information

  • The formatted result breaks my code.
  • The formatted result gives compiler warnings.
  • I or my company would be willing to help fix this.
  • I would like a release if this problem is solved.

Options

Fantomas main branch at 1/1/1990

    { config with
                IndentSize = 2 }

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