-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #80365 from dalexeev/gds-allow-mix-indent-on-blank…
…-lines GDScript: Allow mixed indentation on blank lines
- Loading branch information
Showing
4 changed files
with
35 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[*.{gd,out}] | ||
trim_trailing_whitespace = false |
20 changes: 20 additions & 0 deletions
20
modules/gdscript/tests/scripts/parser/features/mixed_indentation_on_blank_lines.gd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Empty line: | ||
|
||
|
||
# Comment line: | ||
# Comment. | ||
|
||
func test(): | ||
print(1) | ||
|
||
if true: | ||
|
||
# Empty line: | ||
|
||
|
||
print(2) | ||
|
||
# Comment line: | ||
# Comment. | ||
|
||
print(3) |
4 changes: 4 additions & 0 deletions
4
modules/gdscript/tests/scripts/parser/features/mixed_indentation_on_blank_lines.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
GDTEST_OK | ||
1 | ||
2 | ||
3 |