Skip to content

Commit 107485e

Browse files
authored
Fix indentation after class as a property of an object (#257)
1 parent e641540 commit 107485e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Indentation Rules.tmPreferences

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<key>increaseIndentPattern</key>
1212
<string>(?x)
1313
^\s*
14-
( class\b
14+
( .*\bclass\b(?!\s*:) # class keyword without colon after it (otherwise we are in object with property name "class")
1515
| [a-zA-Z\$_](\w|\$|:|\.)*\s*(?=\:(\s*\(.*\))?\s*((=|-)&gt;\s*$)) # function that is not one line
1616
| [a-zA-Z\$_](\w|\$|\.)*\s*(:|=)\s*((if|while)(?!.*?then)|for|$) # assignment using multiline if/while/for
1717
| (if|while|unless)\b(?!.*?then)|(for|switch|when|loop)\b

0 commit comments

Comments
 (0)