Skip to content

Formatter does not preserve empty line if there is a comment #320

Description

@Buitragox

I have this piece of code:

func _ready() -> void:
	%AuthAnswer.grab_focus()

	Greeter.auth_prompt_received.connect(_on_auth_prompt_received)

In this case, the formatter keeps the empty line.

If I add a comment to top statement, it no longer preserves the empty line on format:

func _ready() -> void:
	%AuthAnswer.grab_focus() # Deletes the empty line below with this comment
	Greeter.auth_prompt_received.connect(_on_auth_prompt_received)

Is this intended behavior?

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