Skip to content

Commit

Permalink
PHP extras: Improved scope and this
Browse files Browse the repository at this point in the history
  • Loading branch information
RunDevelopment committed Dec 1, 2021
1 parent 8c5ed25 commit 18e3bc6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions components/prism-php-extras.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
Prism.languages.insertBefore('php', 'variable', {
'this': /\$this\b/,
'this': {
pattern: /\$this\b/,
alias: 'keyword'
},
'global': /\$(?:GLOBALS|HTTP_RAW_POST_DATA|_(?:COOKIE|ENV|FILES|GET|POST|REQUEST|SERVER|SESSION)|argc|argv|http_response_header|php_errormsg)\b/,
'scope': {
pattern: /\b[\w\\]+::/,
inside: {
keyword: /parent|self|static/,
punctuation: /::|\\/
'keyword': /\b(?:parent|self|static)\b/,
'punctuation': /::|\\/
}
}
});
2 changes: 1 addition & 1 deletion components/prism-php-extras.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 18e3bc6

Please sign in to comment.