Bug Description
The formatter removes the space between if and the following identifier in inline lambda functions, creating invalid syntax.
Input (valid GDScript):
visibility_changed.connect(func() -> void: if visible:_update())
Output (invalid GDScript):
visibility_changed.connect(func() -> void: ifvisible:_update())
How to Reproduce
test.gd.zip
# Run the formatter on test.gd
gdscript-formatter test.gd
# Check the diff - line 5 will show 'ifvisible' instead of 'if visible'
Version
gdscript-formatter 0.18.2
Expected Behavior
The space between if and visible should be preserved.
Bug Description
The formatter removes the space between
ifand the following identifier in inline lambda functions, creating invalid syntax.Input (valid GDScript):
Output (invalid GDScript):
How to Reproduce
test.gd.zip
Version
gdscript-formatter 0.18.2
Expected Behavior
The space between
ifandvisibleshould be preserved.