Skip to content

Bad indentation in list comprehension #3181

@brand17

Description

@brand17

Issue created from fantomas-online

Code

[ for x in [] do yield 1 ]

Result

[ for x in [] do
      yield 1 ]

Problem description

Getting two excessive spaces added before yield - there are six instead of four.

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/8/2025

Default Fantomas configuration

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