Description:
The formatter incorrectly breaks multi-line ternary expressions (true if condition else false) that use line continuation (\). Instead of preserving the expression on a single logical line, it splits the tokens across multiple lines in a way that produces invalid syntax.
Input:
func _test() -> void:
var test: bool = true \
if not false \
else false
Output (broken):
func _test() -> void:
var test: bool = true
\
if
not false \
Expected:
The formatter should preserve the ternary expression on a single logical line, either as-is or reformatted in a way that maintains valid GDScript syntax.
Description:
The formatter incorrectly breaks multi-line ternary expressions (
true if condition else false) that use line continuation (\). Instead of preserving the expression on a single logical line, it splits the tokens across multiple lines in a way that produces invalid syntax.Input:
Output (broken):
Expected:
The formatter should preserve the ternary expression on a single logical line, either as-is or reformatted in a way that maintains valid GDScript syntax.