godot_parser icon indicating copy to clipboard operation
godot_parser copied to clipboard

Saved file doesn't match original file whitespaces

Open bkmeneguello opened this issue 7 months ago • 0 comments

When reading a tscn file created by Godot editor, modifying something and saving changes some white spaces unnecessarily.

Original file:

[gd_scene format=3 uid="uid://dqvn6lmjh0kbx"]

[node name="Root" type="Node3D"]

[node name="Node3D" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0)

Saved file:

[gd_scene format=3 uid="uid://dqvn6lmjh0kbx"]

[node name="Root" type="Node3D"]

[node name="Node3D" type="Node3D" parent="."]
transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0 )
........................^..................................^.

This is a problem when using the editor and saving the changes to a VCS.

My suggestion is to remove (or make it optional) the white spaces in this line

bkmeneguello avatar Jun 21 '25 19:06 bkmeneguello