Skip to content

Commit

Permalink
[PHP] Tweak comment positions
Browse files Browse the repository at this point in the history
  • Loading branch information
deathaxe committed Dec 1, 2023
1 parent 740be3c commit 009343f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions PHP/Indentation Rules.tmPreferences
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
\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(\s*if)?\b.*:\s*($|//|/\*|\?>)|(end(if|for(each)?|switch|while))\b) # followed by an keyword that ends a control flow block
(else(\s*if)?\b.*:\s*($|//|/\*|\?>)|(end(if|for(each)?|switch|while))\b) # followed by an keyword that ends a control flow block
)
]]></string>

Expand All @@ -46,7 +46,7 @@
| # OR
^\s* (<\?(php)?\s+)? # the beginning of the line followed by any amount of whitespace and an optional PHP open tag
( (?:
(?:else\s*)?if\s*\g<balanced_paren>|else # PHP "if" related statements
(?:else\s*)?if\s*\g<balanced_paren>|else # PHP "if" related statements
)\s*:(?!.*\bendif\b) # followed by a colon, not followed by an "endif" anywhere on the line
|
(?<php_control_word>foreach|for|switch|while)\s*\g<balanced_paren> # PHP control keywords, followed by balanced parens
Expand Down

0 comments on commit 009343f

Please sign in to comment.