Skip to content

Commit

Permalink
[PHP] fix bug whereby indentation isn't decreased with <? } (#1548)
Browse files Browse the repository at this point in the history
  • Loading branch information
keith-hall authored and wbond committed May 9, 2018
1 parent ec221cb commit 1cb4c3e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions PHP/Indentation Rules.tmPreferences
Expand Up @@ -9,10 +9,13 @@
<dict>
<key>decreaseIndentPattern</key>
<string><![CDATA[(?x)
^ # the start of the line
(
^ # start of the line
(.*\*/)? # optionally with an end block comment somewhere on the line
\s* [}\])] # optionally followed by whitespace, followed by a closing curly brace, square bracket or paren
(
.*\*/ # with an end block comment somewhere on the line
| \s* (<\?(php)?\s+)? # OR a PHP open tag
)? # the above is optional
\s* [}\])] # optionally followed by whitespace, followed by a closing: curly brace, square bracket or paren
| # OR
\s* (<\?(php)?\s+)? # an optional PHP open tag
(else(if)?\b.*:\s*($|//|/\*)|(end(if|for(each)?|switch|while))\b) # followed by an keyword that ends a control flow block
Expand Down

0 comments on commit 1cb4c3e

Please sign in to comment.