Skip to content

Commit 40e57c0

Browse files
committed
Don't indent on if/while/for statements that end with ;
Closes #3109
1 parent 9974df9 commit 40e57c0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scoped-properties/language-javascript.cson

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
| \\( [^)"\']* $
88
| case[\\s\\S]*: $
99
| default: $
10-
| ^ \\s* if \\s* \\( (?!.*?\\belse\\b)
10+
| ^ \\s* if \\s* \\( (?!.*?(\\b(else)\\b|;\\s*$))
1111
| ^ \\s* \\}? \\s* else \\s*
12-
| ^ \\s* (for|while) \\s* \\(
12+
| ^ \\s* (for|while) \\s* \\( (?!.*?;\\s*$)
1313
| ^ \\s* do \\s* $
1414
'
1515
'decreaseIndentPattern': '(?x)

0 commit comments

Comments
 (0)