From 009343f045042bd2ec357e3902b9f316a00e6646 Mon Sep 17 00:00:00 2001 From: deathaxe Date: Fri, 1 Dec 2023 18:34:05 +0100 Subject: [PATCH] [PHP] Tweak comment positions --- PHP/Indentation Rules.tmPreferences | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PHP/Indentation Rules.tmPreferences b/PHP/Indentation Rules.tmPreferences index 7ebe778d39..10c599be02 100644 --- a/PHP/Indentation Rules.tmPreferences +++ b/PHP/Indentation Rules.tmPreferences @@ -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 ) ]]> @@ -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|else # PHP "if" related statements + (?:else\s*)?if\s*\g|else # PHP "if" related statements )\s*:(?!.*\bendif\b) # followed by a colon, not followed by an "endif" anywhere on the line | (?foreach|for|switch|while)\s*\g # PHP control keywords, followed by balanced parens