Skip to content

Commit 6dbe1b4

Browse files
committed
Merge branch 'uk/userdiff-php-enum'
Update the userdiff pattern for PHP. * uk/userdiff-php-enum: userdiff: support enum keyword in PHP hunk header
2 parents febba80 + 2c7f3aa commit 6dbe1b4

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

t/t4018/php-enum

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
enum RIGHT: string
2+
{
3+
case Foo = 'ChangeMe';
4+
}

userdiff.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ PATTERNS("perl",
228228
"|<<|<>|<=>|>>"),
229229
PATTERNS("php",
230230
"^[\t ]*(((public|protected|private|static|abstract|final)[\t ]+)*function.*)$\n"
231-
"^[\t ]*((((final|abstract)[\t ]+)?class|interface|trait).*)$",
231+
"^[\t ]*((((final|abstract)[\t ]+)?class|enum|interface|trait).*)$",
232232
/* -- */
233233
"[a-zA-Z_][a-zA-Z0-9_]*"
234234
"|[-+0-9.e]+|0[xXbB]?[0-9a-fA-F]+"

0 commit comments

Comments
 (0)