Skip to content

Ternary operator is malformed after Formatting #336

Description

@jgyo

In some cases, statements containing ternary operators become malformed due to formatting. For example, the following code includes a backslash mark to break the line into two shorter lines

func _on_check_box_toggled(toggled_on: bool) -> void:
game_logic.human_side = Globals.ChessSides.WHITE \
if toggled_on else Globals.ChessSides.BLACK

After formatting, that code becomes as follows.

func _on_check_box_toggled(toggled_on: bool) -> void:
game_logic.human_side = Globals.ChessSides.WHITE \
if toggled_on
else Globals.ChessSides.BLACK

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions