Skip to content

Commit 59ef51d

Browse files
authoredDec 10, 2021
PHP extras: Improved scope and this (#3243)
1 parent f22ea9f commit 59ef51d

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed
 

‎components/prism-php-extras.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
Prism.languages.insertBefore('php', 'variable', {
2-
'this': /\$this\b/,
2+
'this': {
3+
pattern: /\$this\b/,
4+
alias: 'keyword'
5+
},
36
'global': /\$(?:GLOBALS|HTTP_RAW_POST_DATA|_(?:COOKIE|ENV|FILES|GET|POST|REQUEST|SERVER|SESSION)|argc|argv|http_response_header|php_errormsg)\b/,
47
'scope': {
58
pattern: /\b[\w\\]+::/,
69
inside: {
7-
keyword: /parent|self|static/,
8-
punctuation: /::|\\/
10+
'keyword': /\b(?:parent|self|static)\b/,
11+
'punctuation': /::|\\/
912
}
1013
}
1114
});

‎components/prism-php-extras.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
Please sign in to comment.