-
-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Labels
upstreamThe issue (likely) can't be solved in this repository: a library needs a changeThe issue (likely) can't be solved in this repository: a library needs a change
Description
Code regions inside functions can cause the formater to not indent correctly. When the coderegion is not indented to the "correct" indentation level it moves all code after that to the indentation level of the coderegion. This breaks even more should the coderegion be inside a if/for or similar indentaion.
Its a bit hard to discribe but this is a MRP for the issue. Since coderegion tags are just comments this is perfectly valid gdscript.
extends Node
func _ready() -> void:
var some_var = 1
var some_var2 = 2
#region unused code
#var some_var = 1
#var some_var2 = 2
#endregion
print(some_var * some_var2)
print("This should not be indeted")
func test():
var some_var = 1
var some_var2 = 2
if true:
#region unused code
#var some_var = 1
#var some_var2 = 2
#endregion
print(some_var * some_var2)
print("This should not be indeted")Metadata
Metadata
Assignees
Labels
upstreamThe issue (likely) can't be solved in this repository: a library needs a changeThe issue (likely) can't be solved in this repository: a library needs a change